org.bukkit.block
Interface NoteBlock

All Superinterfaces:
BlockState, Metadatable

public interface NoteBlock
extends BlockState

Represents a note.


Method Summary
 Note getNote()
          Gets the note.
 byte getRawNote()
          Gets the note.
 boolean play()
          Attempts to play the note at block

If the block is no longer a note block, this will return false

 boolean play(byte instrument, byte note)
          Plays an arbitrary note with an arbitrary instrument
 boolean play(Instrument instrument, Note note)
          Plays an arbitrary note with an arbitrary instrument
 void setNote(Note note)
          Set the note.
 void setRawNote(byte note)
          Set the note.
 
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, setData, setRawData, setType, setTypeId, update, update
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 

Method Detail

getNote

Note getNote()
Gets the note.

Returns:
The note.

getRawNote

byte getRawNote()
Gets the note.

Returns:
The note ID.

setNote

void setNote(Note note)
Set the note.

Parameters:
note - The note.

setRawNote

void setRawNote(byte note)
Set the note.

Parameters:
note - The note ID.

play

boolean play()
Attempts to play the note at block

If the block is no longer a note block, this will return false

Returns:
true if successful, otherwise false

play

boolean play(byte instrument,
             byte note)
Plays an arbitrary note with an arbitrary instrument

Parameters:
instrument - Instrument ID
note - Note ID
Returns:
true if successful, otherwise false

play

boolean play(Instrument instrument,
             Note note)
Plays an arbitrary note with an arbitrary instrument

Parameters:
instrument - The instrument
note - The note
Returns:
true if successful, otherwise false
See Also:
Note


Copyright © 2013. All Rights Reserved.