public class SignChangeEvent extends BlockEvent implements Cancellable
若取消本事件,牌子将不会被更改.
Event.Resultblock| 构造器和说明 |
|---|
SignChangeEvent(Block theBlock,
Player thePlayer,
java.lang.String[] theLines) |
| 限定符和类型 | 方法和说明 |
|---|---|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
java.lang.String |
getLine(int index)
获得牌子被写上的内容的某行.
|
java.lang.String[] |
getLines()
获得牌子被写上的全部内容.
|
Player |
getPlayer()
获得设置这个牌子上的字的玩家.
|
boolean |
isCancelled()
获取这个事件是否被取消.一个被取消的事件不会在服务器里被执行,但是仍然会传递事件到其他插件。
|
void |
setCancelled(boolean cancel)
取消这个事件.
|
void |
setLine(int index,
java.lang.String line)
修改牌子被写上的字的某行.
|
getBlockgetEventName, isAsynchronouspublic Player getPlayer()
原文:Gets the player changing the sign involved in this event.
public java.lang.String[] getLines()
原文:Gets all of the lines of text from the sign involved in this event.
public java.lang.String getLine(int index)
throws java.lang.IndexOutOfBoundsException
原文:Gets a single line of text from the sign involved in this event.
index - 要获取的内容的行数,取值0~3java.lang.IndexOutOfBoundsException - 如果行数 > 3 或者 < 0public void setLine(int index,
java.lang.String line)
throws java.lang.IndexOutOfBoundsException
原文:Sets a single line for the sign involved in this event
index - 要设定的内容的行数line - 要设定的内容java.lang.IndexOutOfBoundsException - 如果行数 > 3 或者 < 0public boolean isCancelled()
Cancellable原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
isCancelled 在接口中 Cancellablepublic void setCancelled(boolean cancel)
Cancellable原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
setCancelled 在接口中 Cancellablecancel - 如果你想取消这个事件,则为truepublic HandlerList getHandlers()
getHandlers 在类中 Eventpublic static HandlerList getHandlerList()