public class PlayerKickEvent extends PlayerEvent implements Cancellable
Event.Resultplayer| Constructor and Description |
|---|
PlayerKickEvent(@NotNull Player playerKicked,
net.kyori.adventure.text.Component kickReason,
net.kyori.adventure.text.Component leaveMessage) |
PlayerKickEvent(@NotNull Player playerKicked,
@NotNull String kickReason,
@NotNull String leaveMessage)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull String |
getLeaveMessage()
Deprecated.
in favour of
leaveMessage() |
@NotNull String |
getReason()
Deprecated.
in favour of
reason() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
net.kyori.adventure.text.Component |
leaveMessage()
Gets the leave message send to all online players
|
void |
leaveMessage(net.kyori.adventure.text.Component leaveMessage)
Sets the leave message send to all online players
|
net.kyori.adventure.text.Component |
reason()
Gets the reason why the player is getting kicked
|
void |
reason(net.kyori.adventure.text.Component kickReason)
Sets the reason why the player is getting kicked
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setLeaveMessage(@NotNull String leaveMessage)
Deprecated.
in favour of
leaveMessage(net.kyori.adventure.text.Component) |
void |
setReason(@NotNull String kickReason)
Deprecated.
in favour of
reason(net.kyori.adventure.text.Component) |
getPlayercallEvent, getEventName, isAsynchronous@Deprecated public PlayerKickEvent(@NotNull @NotNull Player playerKicked, @NotNull @NotNull String kickReason, @NotNull @NotNull String leaveMessage)
@NotNull public net.kyori.adventure.text.Component leaveMessage()
public void leaveMessage(@NotNull net.kyori.adventure.text.Component leaveMessage)
leaveMessage - leave message@NotNull public net.kyori.adventure.text.Component reason()
public void reason(@NotNull net.kyori.adventure.text.Component kickReason)
kickReason - kick reason@NotNull @Deprecated public @NotNull String getReason()
reason()@NotNull @Deprecated public @NotNull String getLeaveMessage()
leaveMessage()public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@Deprecated public void setReason(@NotNull @NotNull String kickReason)
reason(net.kyori.adventure.text.Component)kickReason - kick reason@Deprecated public void setLeaveMessage(@NotNull @NotNull String leaveMessage)
leaveMessage(net.kyori.adventure.text.Component)leaveMessage - leave message@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.