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

Public Member Functions

 SignChangeEvent (final Block theBlock, final Player thePlayer, final String[] theLines)
 
Player getPlayer ()
 
String[] getLines ()
 
String getLine (int index) throws IndexOutOfBoundsException
 
void setLine (int index, String line) throws IndexOutOfBoundsException
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
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 sign is changed by a player.

If a Sign Change event is cancelled, the sign will not be changed.

Definition at line 13 of file SignChangeEvent.java.

Member Function Documentation

String org.bukkit.event.block.SignChangeEvent.getLine ( int  index) throws IndexOutOfBoundsException

Gets a single line of text from the sign involved in this event.

Parameters
indexindex of the line to get
Returns
the String containing the line of text associated with the provided index
Exceptions
IndexOutOfBoundsExceptionthrown when the provided index is > 3 or < 0

Definition at line 52 of file SignChangeEvent.java.

52  {
53  return lines[index];
54  }
String [] org.bukkit.event.block.SignChangeEvent.getLines ( )

Gets all of the lines of text from the sign involved in this event.

Returns
the String array for the sign's lines new text

Definition at line 39 of file SignChangeEvent.java.

39  {
40  return lines;
41  }
Player org.bukkit.event.block.SignChangeEvent.getPlayer ( )

Gets the player changing the sign involved in this event.

Returns
the Player involved in this event

Definition at line 30 of file SignChangeEvent.java.

30  {
31  return player;
32  }
boolean org.bukkit.event.block.SignChangeEvent.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 68 of file SignChangeEvent.java.

68  {
69  return cancel;
70  }
void org.bukkit.event.block.SignChangeEvent.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 72 of file SignChangeEvent.java.

72  {
73  this.cancel = cancel;
74  }
void org.bukkit.event.block.SignChangeEvent.setLine ( int  index,
String  line 
) throws IndexOutOfBoundsException

Sets a single line for the sign involved in this event

Parameters
indexindex of the line to set
linetext to set
Exceptions
IndexOutOfBoundsExceptionthrown when the provided index is > 3 or < 0

Definition at line 64 of file SignChangeEvent.java.

64  {
65  lines[index] = line;
66  }

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