Class ProfileWhitelistVerifyEvent

java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent

public class ProfileWhitelistVerifyEvent extends Event
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.
  • Constructor Details

  • Method Details

    • getKickMessage

      @Deprecated @Nullable public @Nullable String getKickMessage()
      Deprecated.
      Returns:
      the currently planned message to send to the user if they are not whitelisted
    • setKickMessage

      @Deprecated public void setKickMessage(@Nullable @Nullable String kickMessage)
      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

      @Nullable public @Nullable Component kickMessage()
      Returns:
      the currently planned message to send to the user if they are not whitelisted
    • kickMessage

      public void kickMessage(@Nullable @Nullable Component 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

      @NotNull public @NotNull PlayerProfile 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

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

      @NotNull public static @NotNull HandlerList getHandlerList()