Class KickedFromServerEvent

  • All Implemented Interfaces:
    ResultedEvent<KickedFromServerEvent.ServerKickResult>

    public final class KickedFromServerEvent
    extends java.lang.Object
    implements ResultedEvent<KickedFromServerEvent.ServerKickResult>
    Fired when a player is kicked from a server. You may either allow Velocity to kick the player (with an optional reason override) or redirect the player to a separate server. By default, Velocity will notify the user (if they are already connected to a server) or disconnect them (if they are not on a server and no other servers are available).
    • Constructor Detail

      • KickedFromServerEvent

        public KickedFromServerEvent​(Player player,
                                     RegisteredServer server,
                                     @Nullable net.kyori.adventure.text.Component originalReason,
                                     boolean duringServerConnect,
                                     KickedFromServerEvent.ServerKickResult result)
        Creates a KickedFromServerEvent instance.
        Parameters:
        player - the player affected
        server - the server the player disconnected from
        originalReason - the reason for being kicked, optional
        duringServerConnect - whether or not the player was kicked during the connection process
        result - the initial result