Class KickedFromServerEvent

  • All Implemented Interfaces:
    ResultedEvent<KickedFromServerEvent.ServerKickResult>

    public final class KickedFromServerEvent
    extends 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

        @Deprecated
        public KickedFromServerEvent​(Player player,
                                     RegisteredServer server,
                                     @Nullable net.kyori.text.Component originalReason,
                                     boolean duringServerConnect,
                                     net.kyori.text.Component fancyReason)
        Deprecated.
        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
        fancyReason - a fancy reason for being disconnected, used for the initial result
      • KickedFromServerEvent

        @Deprecated
        public KickedFromServerEvent​(Player player,
                                     RegisteredServer server,
                                     @Nullable net.kyori.text.Component originalReason,
                                     boolean duringServerConnect,
                                     KickedFromServerEvent.ServerKickResult result)
        Deprecated.
        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
      • KickedFromServerEvent

        public KickedFromServerEvent​(Player player,
                                     RegisteredServer server,
                                     @Nullable 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