Package io.papermc.paper.event.player
Class PlayerServerFullCheckEvent
java.lang.Object
org.bukkit.event.Event
io.papermc.paper.event.player.PlayerServerFullCheckEvent
Fires when computing if a server is currently considered full for a player.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerServerFullCheckEvent
(PlayerProfile profile, Component kickMessage, boolean shouldKick) -
Method Summary
Modifier and TypeMethodDescriptionvoid
allow
(boolean allow) Sets whether the player is able to join this server.void
static HandlerList
boolean
Gets if the player is currently able to join the server.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerServerFullCheckEvent
@Internal public PlayerServerFullCheckEvent(PlayerProfile profile, Component kickMessage, boolean shouldKick)
-
-
Method Details
-
kickMessage
- Returns:
- the currently planned message to send to the user if they are unable to join the server
-
deny
- Parameters:
kickMessage
- The message to send to the player on kick if not able to join.
-
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
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-