Cancellable
public class SignChangeEvent extends BlockEvent implements Cancellable
If a Sign Change event is cancelled, the sign will not be changed.
Event.Result
block
Constructor | Description |
---|---|
SignChangeEvent(Block theBlock,
Player thePlayer,
java.lang.String[] theLines) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
java.lang.String |
getLine(int index) |
Gets a single line of text from the sign involved in this event.
|
java.lang.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,
java.lang.String line) |
Sets a single line for the sign involved in this event
|
getBlock
getEventName, isAsynchronous
public Player getPlayer()
public java.lang.String[] getLines()
public java.lang.String getLine(int index) throws java.lang.IndexOutOfBoundsException
index
- index of the line to getjava.lang.IndexOutOfBoundsException
- thrown when the provided index is > 3
or < 0public void setLine(int index, java.lang.String line) throws java.lang.IndexOutOfBoundsException
index
- index of the line to setline
- text to setjava.lang.IndexOutOfBoundsException
- thrown when the provided index is > 3
or < 0public 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 HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.