Package org.bukkit.block
Interface NoteBlock
- All Superinterfaces:
BlockState,Metadatable
public interface NoteBlock extends BlockState
Represents a note.
-
Method Summary
Modifier and Type Method Description NotegetNote()Gets the note.bytegetRawNote()Deprecated.Magic valuebooleanplay()Attempts to play the note at blockbooleanplay(byte instrument, byte note)Deprecated.Magic valuebooleanplay(Instrument instrument, Note note)Plays an arbitrary note with an arbitrary instrumentvoidsetNote(Note note)Set the note.voidsetRawNote(byte note)Deprecated.Magic valueMethods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, updateMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Method Details
-
getNote
Note getNote()Gets the note.- Returns:
- The note.
-
getRawNote
@Deprecated byte getRawNote()Deprecated.Magic valueGets the note.- Returns:
- The note ID.
-
setNote
Set the note.- Parameters:
note- The note.
-
setRawNote
@Deprecated void setRawNote(byte note)Deprecated.Magic valueSet the note.- Parameters:
note- The note ID.
-
play
boolean play()Attempts to play the note at blockIf the block is no longer a note block, this will return false
- Returns:
- true if successful, otherwise false
-
play
@Deprecated boolean play(byte instrument, byte note)Deprecated.Magic valuePlays an arbitrary note with an arbitrary instrument- Parameters:
instrument- Instrument IDnote- Note ID- Returns:
- true if successful, otherwise false
-
play
Plays an arbitrary note with an arbitrary instrument- Parameters:
instrument- The instrumentnote- The note- Returns:
- true if successful, otherwise false
- See Also:
Note
-