Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
NoteBlock.java
1 package org.bukkit.block;
2 
3 import org.bukkit.Instrument;
4 import org.bukkit.Note;
5 
6 /**
7  * Represents a note.
8  */
9 public interface NoteBlock extends BlockState {
10 
11  /**
12  * Gets the note.
13  *
14  * @return The note.
15  */
16  public Note getNote();
17 
18  /**
19  * Gets the note.
20  *
21  * @return The note ID.
22  * @deprecated Magic value
23  */
24  @Deprecated
25  public byte getRawNote();
26 
27  /**
28  * Set the note.
29  *
30  * @param note The note.
31  */
32  public void setNote(Note note);
33 
34  /**
35  * Set the note.
36  *
37  * @param note The note ID.
38  * @deprecated Magic value
39  */
40  @Deprecated
41  public void setRawNote(byte note);
42 
43  /**
44  * Attempts to play the note at block
45  * <p>
46  * If the block is no longer a note block, this will return false
47  *
48  * @return true if successful, otherwise false
49  */
50  public boolean play();
51 
52  /**
53  * Plays an arbitrary note with an arbitrary instrument
54  *
55  * @param instrument Instrument ID
56  * @param note Note ID
57  * @return true if successful, otherwise false
58  * @deprecated Magic value
59  */
60  @Deprecated
61  public boolean play(byte instrument, byte note);
62 
63  /**
64  * Plays an arbitrary note with an arbitrary instrument
65  *
66  * @param instrument The instrument
67  * @param note The note
68  * @return true if successful, otherwise false
69  * @see Instrument Note
70  */
71  public boolean play(Instrument instrument, Note note);
72 }
void setNote(Note note)
void setRawNote(byte note)