public class NotePlayEvent extends BlockEvent implements Cancellable
Constructor and Description |
---|
NotePlayEvent(Block block,
List<Player> players,
Note note,
Instrument instrument) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(boolean cancelled) |
Instrument |
instrument()
Get the Instrument being used to play the Note
|
boolean |
isIgnored() |
Note |
note()
Returns the Note being played
|
List<Player> |
players()
Returns a list of players that will hear the Note being played
|
void |
setInstrument(Instrument instrument)
Set the Instrument to play the Note
|
void |
setNote(Note note)
Set the Note that is being played
|
block
public NotePlayEvent(Block block, List<Player> players, Note note, Instrument instrument)
block
- Block playing the Noteplayers
- List of Players who can hear the Notenote
- Note representing the sound being playedinstrument
- Instrument of the Notepublic Note note()
public void setNote(Note note)
note
- Note that is being playedpublic Instrument instrument()
public void setInstrument(Instrument instrument)
instrument
- Instrument to play the notepublic List<Player> players()
public boolean isIgnored()
isIgnored
in interface Cancellable
public void cancel(boolean cancelled)
cancel
in interface Cancellable
cancelled
- set the cancellation state of the eventCopyright © 2016. All rights reserved.