OrdinaryKickEvent Class
Introduction#
The OrdinaryKickEvent class represents an event that is triggered when a player is kicked from the server.
Methods#
This class extends UserCancellableEvent and adds methods related to kicks.
Getter reason#
java
String reason();Description:
Gets the reason for the kick.
Returns:
The reason as a String.
Setter reason#
java
void reason(String reason);Description:
Changes the reason shown to the kicked player.
Parameters:
reason- The new kick reason.
Returns:
Nothing.
apiInitiated#
java
boolean apiInitiated();Description:
Determines if the kick was initiated by the API, i.e. through User#kick(String).
Returns:
true if the kick was initiated by the API, false otherwise.