public class PlayerKickEvent extends PlayerEvent implements Cancellable
Event.Resultplayer| 构造器和说明 |
|---|
PlayerKickEvent(Player playerKicked,
java.lang.String kickReason,
java.lang.String leaveMessage) |
| 限定符和类型 | 方法和说明 |
|---|---|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
java.lang.String |
getLeaveMessage()
获取某玩家被踢出后,发送给全体玩家的离开消息.
|
java.lang.String |
getReason()
获取踢出的玩家的理由.
|
boolean |
isCancelled()
获取这个事件是否被取消.一个被取消的事件不会在服务器里被执行,但是仍然会传递事件到其他插件。
|
void |
setCancelled(boolean cancel)
取消这个事件.
|
void |
setLeaveMessage(java.lang.String leaveMessage)
设置某玩家被踢出后,发送给全体玩家的离开消息.
|
void |
setReason(java.lang.String kickReason)
设置踢出某玩家的理由.
|
getPlayergetEventName, isAsynchronouspublic PlayerKickEvent(Player playerKicked, java.lang.String kickReason, java.lang.String leaveMessage)
public java.lang.String getReason()
原文:Gets the reason why the player is getting kicked
public java.lang.String getLeaveMessage()
原文:Gets the leave message send to all online players
public 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 void setReason(java.lang.String kickReason)
原文:Sets the reason why the player is getting kicked
kickReason - kick reasonpublic void setLeaveMessage(java.lang.String leaveMessage)
原文:Sets the leave message send to all online players
leaveMessage - 离开消息public HandlerList getHandlers()
getHandlers 在类中 Eventpublic static HandlerList getHandlerList()