public class NotePlayEvent extends BlockEvent implements Cancellable
Event.Resultblock| Constructor and Description | 
|---|
| NotePlayEvent(Block block,
             Instrument instrument,
             Note note) | 
| Modifier and Type | Method and Description | 
|---|---|
| static HandlerList | getHandlerList() | 
| HandlerList | getHandlers() | 
| Instrument | getInstrument()Gets the  Instrumentto be used. | 
| Note | getNote()Gets the  Noteto 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  Instrumentto be used. | 
| void | setNote(Note note)Overrides the  Noteto be played. | 
getBlockgetEventName, isAsynchronouspublic NotePlayEvent(Block block, Instrument instrument, Note note)
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic Instrument getInstrument()
Instrument to be used.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 Eventpublic static HandlerList getHandlerList()
Copyright © 2015. All rights reserved.