|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.SignChangeEvent
public class SignChangeEvent
Called when a sign is changed by a player.
If a Sign Change event is cancelled, the sign will not be changed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.bukkit.event.Event |
|---|
Event.Result |
| Field Summary |
|---|
| Fields inherited from class org.bukkit.event.block.BlockEvent |
|---|
block |
| Constructor Summary | |
|---|---|
SignChangeEvent(Block theBlock,
Player thePlayer,
String[] theLines)
|
|
| Method Summary | |
|---|---|
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
String |
getLine(int index)
Gets a single line of text from the sign involved in this event. |
String[] |
getLines()
Gets all of the lines of text from the sign involved in this event. |
Player |
getPlayer()
Gets the player changing the sign involved in this event. |
boolean |
isCancelled()
Gets the cancellation state of this event. |
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event. |
void |
setLine(int index,
String line)
Sets a single line for the sign involved in this event |
| Methods inherited from class org.bukkit.event.block.BlockEvent |
|---|
getBlock |
| Methods inherited from class org.bukkit.event.Event |
|---|
getEventName, isAsynchronous |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SignChangeEvent(Block theBlock,
Player thePlayer,
String[] theLines)
| Method Detail |
|---|
public Player getPlayer()
public String[] getLines()
public String getLine(int index)
throws IndexOutOfBoundsException
index - index of the line to get
IndexOutOfBoundsException - thrown when the provided index is > 4 and < 0
public void setLine(int index,
String line)
throws IndexOutOfBoundsException
index - index of the line to setline - text to set
IndexOutOfBoundsException - thrown when the provided index is > 4 and < 0public boolean isCancelled()
Cancellable
isCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
Cancellable
setCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||