Cancellable
public class NotePlayEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor | Description |
---|---|
NotePlayEvent(Block block,
Instrument instrument,
Note note) |
Modifier and Type | Method | Description |
---|---|---|
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) |
Deprecated.
no effect on newer Minecraft versions
|
void |
setNote(Note note) |
Deprecated.
no effect on newer Minecraft versions
|
getBlock
getEventName, isAsynchronous
public NotePlayEvent(Block block, Instrument instrument, Note note)
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.@Deprecated public void setInstrument(Instrument instrument)
Instrument
to be used.instrument
- the Instrument. Has no effect if null.@Deprecated 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()
Copyright © 2018. All rights reserved.