Class ProfileWhitelistVerifyEvent
java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent
Fires when the server needs to verify if a player is whitelisted.
Plugins may override/control the servers whitelist with this event,
and dynamically change the kick message.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionProfileWhitelistVerifyEvent(@NotNull PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) Deprecated.ProfileWhitelistVerifyEvent(@NotNull PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable Component kickMessage) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerListDeprecated.booleanisOp()booleanbooleanvoidkickMessage(@Nullable Component kickMessage) voidsetKickMessage(@Nullable String kickMessage) Deprecated.voidsetWhitelisted(boolean whitelisted) Changes the players whitelisted state.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
ProfileWhitelistVerifyEvent
@Deprecated public ProfileWhitelistVerifyEvent(@NotNull @NotNull PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable @Nullable String kickMessage) Deprecated. -
ProfileWhitelistVerifyEvent
-
-
Method Details
-
getKickMessage
Deprecated.usekickMessage()- Returns:
- the currently planned message to send to the user if they are not whitelisted
-
setKickMessage
Deprecated.- Parameters:
kickMessage- The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
-
kickMessage
- Returns:
- the currently planned message to send to the user if they are not whitelisted
-
kickMessage
- Parameters:
kickMessage- The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
-
getPlayerProfile
- Returns:
- The profile of the player trying to connect
-
isWhitelisted
public boolean isWhitelisted()- Returns:
- Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
-
setWhitelisted
public void setWhitelisted(boolean whitelisted) Changes the players whitelisted state. false will deny the login- Parameters:
whitelisted- The new whitelisted state
-
isOp
public boolean isOp()- Returns:
- if the player obtained whitelist status by having op
-
isWhitelistEnabled
public boolean isWhitelistEnabled()- Returns:
- if the server even has whitelist on
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-
kickMessage()