|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.event.Event org.bukkit.event.block.BlockEvent org.bukkit.event.block.NotePlayEvent
public class NotePlayEvent
Called when a note block is being played through player interaction or a redstone current.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.bukkit.event.Event |
---|
Event.Result |
Field Summary |
---|
Fields inherited from class org.bukkit.event.block.BlockEvent |
---|
block |
Constructor Summary | |
---|---|
NotePlayEvent(Block block,
Instrument instrument,
Note note)
|
Method Summary | |
---|---|
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
Instrument |
getInstrument()
Gets the Instrument to be used. |
Note |
getNote()
Gets the Note to be played. |
boolean |
isCancelled()
Gets the cancellation state of this event. |
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event. |
void |
setInstrument(Instrument instrument)
Overrides the Instrument to be used. |
void |
setNote(Note note)
Overrides the Note to be played. |
Methods inherited from class org.bukkit.event.block.BlockEvent |
---|
getBlock |
Methods inherited from class org.bukkit.event.Event |
---|
getEventName, isAsynchronous |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotePlayEvent(Block block, Instrument instrument, Note note)
Method Detail |
---|
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic Instrument getInstrument()
Instrument
to be used.
public Note getNote()
Note
to be played.
public void setInstrument(Instrument instrument)
Instrument
to be used.
instrument
- the Instrument. Has no effect if null.public void setNote(Note note)
Note
to be played.
note
- the Note. Has no effect if null.public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |