Class KickedFromServerEvent.RedirectPlayer

    • Method Detail

      • 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 interface ResultedEvent.Result
        Returns:
        whether or not the event is allowed to proceed
      • getMessageComponent

        public @Nullable Component getMessageComponent()
      • create

        public static KickedFromServerEvent.RedirectPlayer create​(RegisteredServer server,
                                                                  Component message)
        Creates a new redirect result to forward the player to the specified server. The specified message will be sent to the player after the redirection. Use Component.empty() to skip sending any messages to the player.
        Parameters:
        server - the server to send the player to
        message - the message will be sent to the player after redirecting
        Returns:
        the redirect result
      • create

        public static KickedFromServerEvent.ServerKickResult create​(RegisteredServer server)
        Creates a new redirect result to forward the player to the specified server. The kick reason will be displayed to the player
        Parameters:
        server - the server to send the player to
        Returns:
        the redirect result