Class PlayerServerFullCheckEvent

java.lang.Object
org.bukkit.event.Event
io.papermc.paper.event.player.PlayerServerFullCheckEvent

@NullMarked public class PlayerServerFullCheckEvent extends Event
Fires when computing if a server is currently considered full for a player.
  • Constructor Details

  • Method Details

    • kickMessage

      @Contract(pure=true) public Component kickMessage()
      Returns:
      the currently planned message to send to the user if they are unable to join the server
    • deny

      public void deny(Component kickMessage)
      Parameters:
      kickMessage - The message to send to the player on kick if not able to join.
    • getPlayerProfile

      public PlayerProfile getPlayerProfile()
      Returns:
      The profile of the player trying to connect
    • allow

      public void allow(boolean allow)
      Sets whether the player is able to join this server.
      Parameters:
      allow - can join the server
    • isAllowed

      public boolean isAllowed()
      Gets if the player is currently able to join the server.
      Returns:
      can join the server, or false if the server should be considered full
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()