Class KickedFromServerEvent.DisconnectPlayer
java.lang.Object
com.velocitypowered.api.event.player.KickedFromServerEvent.DisconnectPlayer
- All Implemented Interfaces:
KickedFromServerEvent.ServerKickResult
,ResultedEvent.Result
- Enclosing class:
- KickedFromServerEvent
public static final class KickedFromServerEvent.DisconnectPlayer
extends Object
implements KickedFromServerEvent.ServerKickResult
Tells the proxy to disconnect the player with the specified reason.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newKickedFromServerEvent.DisconnectPlayer
with the specified reason.boolean
Returns whether or not the event is allowed to proceed.toString()
-
Method Details
-
isAllowed
public boolean isAllowed()Description copied from interface:ResultedEvent.Result
Returns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.- Specified by:
isAllowed
in interfaceResultedEvent.Result
- Returns:
- whether or not the event is allowed to proceed
-
getReasonComponent
-
create
Creates a newKickedFromServerEvent.DisconnectPlayer
with the specified reason.- Parameters:
reason
- the reason to use when disconnecting the player- Returns:
- the disconnect result
-
toString
-