Cancellable
public class PlayerKickEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor | Description |
---|---|
PlayerKickEvent(Player playerKicked,
java.lang.String kickReason,
java.lang.String leaveMessage) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
java.lang.String |
getLeaveMessage() |
Gets the leave message send to all online players
|
java.lang.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(java.lang.String leaveMessage) |
Sets the leave message send to all online players
|
void |
setReason(java.lang.String kickReason) |
Sets the reason why the player is getting kicked
|
getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPlayer
public PlayerKickEvent(Player playerKicked, java.lang.String kickReason, java.lang.String leaveMessage)
public java.lang.String getReason()
public java.lang.String getLeaveMessage()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic void setReason(java.lang.String kickReason)
kickReason
- kick reasonpublic void setLeaveMessage(java.lang.String leaveMessage)
leaveMessage
- leave messagepublic HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.