Package com.destroystokyo.paper.event.profile

# 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.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Constructor Summary

Constructors
Constructor
Description
`ProfileWhitelistVerifyEvent(@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 Type
Method
Description
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@Nullable String`
`getKickMessage()`
Deprecated.
use `kickMessage()`
`@NotNull PlayerProfile`
`getPlayerProfile()`
`boolean`
`isOp()`
`boolean`
`isWhitelisted()`
`boolean`
`isWhitelistEnabled()`
`@Nullable Component`
`kickMessage()`
`void`
`kickMessage(@Nullable Component kickMessage)`
`void`
`setKickMessage(@Nullable String kickMessage)`
Deprecated.
Use `kickMessage(Component)`
`void`
`setWhitelisted(boolean whitelisted)`
Changes the players whitelisted state.

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ProfileWhitelistVerifyEvent

@Deprecated public ProfileWhitelistVerifyEvent(@NotNull @NotNull PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable @Nullable String kickMessage)
Deprecated.

### ProfileWhitelistVerifyEvent

public ProfileWhitelistVerifyEvent(@NotNull @NotNull PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable @Nullable Component kickMessage)

## Method Details

### getKickMessage

@Deprecated @Nullable public @Nullable String getKickMessage()
Deprecated.
use `kickMessage()`

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.
Use `kickMessage(Component)`

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()