Cancellable
public class PlayerKickEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor | Description |
---|---|
PlayerKickEvent(@NotNull Player playerKicked,
@NotNull String kickReason,
@NotNull String leaveMessage) |
Modifier and Type | Method | Description |
---|---|---|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull String |
getLeaveMessage() |
Gets the leave message send to all online players
|
@NotNull 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(@NotNull String leaveMessage) |
Sets the leave message send to all online players
|
void |
setReason(@NotNull 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
@NotNull public @NotNull String getReason()
@NotNull public @NotNull 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(@NotNull @NotNull String kickReason)
kickReason
- kick reasonpublic void setLeaveMessage(@NotNull @NotNull String leaveMessage)
leaveMessage
- leave message@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.