Cancellablepublic class PlayerKickEvent extends PlayerEvent implements Cancellable
Event.Resultplayer| Constructor | Description | 
|---|---|
| PlayerKickEvent(Player playerKicked,
               String kickReason,
               String leaveMessage) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| String | getLeaveMessage() | Gets the leave message send to all online players | 
| String | getReason() | Gets the reason why the player is getting kicked | 
| boolean | isCancelled() | Gets the cancellation state of this event. | 
| void | setCancelled(boolean cancel) | Sets the cancellation state of this event. | 
| void | setLeaveMessage(String leaveMessage) | Sets the leave message send to all online players | 
| void | setReason(String kickReason) | Sets the reason why the player is getting kicked | 
callEvent, getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPlayer@NotNull public String getReason()
@NotNull public String getLeaveMessage()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic void setReason(@NotNull
                      String kickReason)
kickReason - kick reasonpublic void setLeaveMessage(@NotNull
                            String leaveMessage)
leaveMessage - leave message@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.