Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.block.NotePlayEvent Class Reference
Inheritance diagram for org.bukkit.event.block.NotePlayEvent:
org.bukkit.event.block.BlockEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 NotePlayEvent (Block block, Instrument instrument, Note note)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
Instrument getInstrument ()
 
Note getNote ()
 
void setInstrument (Instrument instrument)
 
void setNote (Note note)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.block.BlockEvent
 BlockEvent (final Block theBlock)
 
final Block getBlock ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.block.BlockEvent
Block block
 

Detailed Description

Called when a note block is being played through player interaction or a redstone current.

Definition at line 13 of file NotePlayEvent.java.

Member Function Documentation

Instrument org.bukkit.event.block.NotePlayEvent.getInstrument ( )

Gets the Instrument to be used.

Returns
the Instrument;

Definition at line 39 of file NotePlayEvent.java.

39  {
40  return instrument;
41  }
Note org.bukkit.event.block.NotePlayEvent.getNote ( )

Gets the Note to be played.

Returns
the Note.

Definition at line 48 of file NotePlayEvent.java.

48  {
49  return note;
50  }
boolean org.bukkit.event.block.NotePlayEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 26 of file NotePlayEvent.java.

26  {
27  return cancelled;
28  }
void org.bukkit.event.block.NotePlayEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 30 of file NotePlayEvent.java.

30  {
31  this.cancelled = cancel;
32  }
void org.bukkit.event.block.NotePlayEvent.setInstrument ( Instrument  instrument)

Overrides the Instrument to be used.

Parameters
instrumentthe Instrument. Has no effect if null.

Definition at line 57 of file NotePlayEvent.java.

57  {
58  if (instrument != null) {
59  this.instrument = instrument;
60  }
61 
62  }
void org.bukkit.event.block.NotePlayEvent.setNote ( Note  note)

Overrides the Note to be played.

Parameters
notethe Note. Has no effect if null.

Definition at line 69 of file NotePlayEvent.java.

69  {
70  if (note != null) {
71  this.note = note;
72  }
73  }

The documentation for this class was generated from the following file: