类 PlayerKickEvent

所有已实现的接口:
Cancellable

public class PlayerKickEvent extends PlayerEvent implements Cancellable
玩家被服务器踢出事件.
  • 构造器详细资料

    • PlayerKickEvent

      public PlayerKickEvent(Player playerKicked, String kickReason, String leaveMessage)
  • 方法详细资料

    • getReason

      public String getReason()
      获取踢出的玩家的理由.

      原文:Gets the reason why the player is getting kicked

      返回:
      踢出玩家的理由
    • getLeaveMessage

      public String getLeaveMessage()
      获取某玩家被踢出后,发送给全体玩家的离开消息.

      原文:Gets the leave message send to all online players

      返回:
      离开消息
    • isCancelled

      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 在接口中 Cancellable
      返回:
      如果事件已经被取消,则为true
    • setCancelled

      public 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 在接口中 Cancellable
      参数:
      cancel - 如果你想取消这个事件,则为true
    • setReason

      public void setReason(String kickReason)
      设置踢出某玩家的理由.

      原文:Sets the reason why the player is getting kicked

      参数:
      kickReason - kick reason
    • setLeaveMessage

      public void setLeaveMessage(String leaveMessage)
      设置某玩家被踢出后,发送给全体玩家的离开消息.

      原文:Sets the leave message send to all online players

      参数:
      leaveMessage - 离开消息
    • getHandlers

      public HandlerList getHandlers()
      指定者:
      getHandlers 在类中 Event
    • getHandlerList

      public static HandlerList getHandlerList()