Cancellablepublic class SignChangeEvent extends BlockEvent implements Cancellable
If a Sign Change event is cancelled, the sign will not be changed.
Event.Resultblock| Constructor | Description | 
|---|---|
SignChangeEvent(Block theBlock,
               Player thePlayer,
               String[] theLines) | 
| Modifier and Type | Method | Description | 
|---|---|---|
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 
 | 
getBlockgetEventName, isAsynchronous@NotNull public Player getPlayer()
@NotNull public String[] getLines()
@Nullable public String getLine(int index) throws IndexOutOfBoundsException
index - index of the line to getIndexOutOfBoundsException - thrown when the provided index is > 3
     or < 0public void setLine(int index,
                    @Nullable
                    String line)
             throws IndexOutOfBoundsException
index - index of the line to setline - text to setIndexOutOfBoundsException - thrown when the provided index is > 3
     or < 0public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.