Package org.bukkit.event.player

# Class PlayerPreLoginEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerPreLoginEvent

@Deprecated public class PlayerPreLoginEvent extends Event
Deprecated.
This event causes synchronization from the login thread; `AsyncPlayerPreLoginEvent` is preferred to keep the secondary threads asynchronous.
Stores details for players attempting to log in

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`PlayerPreLoginEvent.Result`
Deprecated.
Basic kick reasons for communicating to plugins

## Constructor Summary

Constructors
Constructor
Description
`PlayerPreLoginEvent(@NotNull String name, @NotNull InetAddress ipAddress)`
Deprecated.
`PlayerPreLoginEvent(@NotNull String name, @NotNull InetAddress ipAddress, @NotNull UUID uniqueId)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`void`
`allow()`
Deprecated.
Allows the player to log in
`void`
`disallow(@NotNull PlayerPreLoginEvent.Result result, @NotNull String message)`
Deprecated.
in favour of `disallow(org.bukkit.event.player.PlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)`
`void`
`disallow(@NotNull PlayerPreLoginEvent.Result result, Component message)`
Deprecated.
Disallows the player from logging in, with the given reason
`@NotNull InetAddress`
`getAddress()`
Deprecated.
Gets the player IP address.
`static @NotNull HandlerList`
`getHandlerList()`
Deprecated.
`@NotNull HandlerList`
`getHandlers()`
Deprecated.
`@NotNull String`
`getKickMessage()`
Deprecated.
in favour of `kickMessage()`
`@NotNull String`
`getName()`
Deprecated.
Gets the player's name.
`@NotNull PlayerPreLoginEvent.Result`
`getResult()`
Deprecated.
Gets the current result of the login, as an enum
`@NotNull UUID`
`getUniqueId()`
Deprecated.
Gets the player's unique ID.
`Component`
`kickMessage()`
Deprecated.
Gets the current kick message that will be used if getResult() != Result.ALLOWED
`void`
`kickMessage(Component message)`
Deprecated.
Sets the kick message to display if getResult() != Result.ALLOWED
`void`
`setKickMessage(@NotNull String message)`
Deprecated.
in favour of `kickMessage(net.kyori.adventure.text.Component)`
`void`
`setResult(@NotNull PlayerPreLoginEvent.Result result)`
Deprecated.
Sets the new result of the login, as an enum

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

### PlayerPreLoginEvent

@Deprecated public PlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress)
Deprecated.

### PlayerPreLoginEvent

public PlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress, @NotNull @NotNull UUID uniqueId)
Deprecated.

## Method Details

### getResult

@NotNull public @NotNull PlayerPreLoginEvent.Result getResult()
Deprecated.
Gets the current result of the login, as an enum

Returns:
  Current Result of the login

### setResult

public void setResult(@NotNull @NotNull PlayerPreLoginEvent.Result result)
Deprecated.
Sets the new result of the login, as an enum

Parameters:
  `result` - New result to set

### kickMessage

@NotNull public Component kickMessage()
Deprecated.
Gets the current kick message that will be used if getResult() != Result.ALLOWED

Returns:
  Current kick message

### kickMessage

public void kickMessage(@NotNull Component message)
Deprecated.
Sets the kick message to display if getResult() != Result.ALLOWED

Parameters:
  `message` - New kick message

### disallow

public void disallow(@NotNull @NotNull PlayerPreLoginEvent.Result result, @NotNull Component message)
Deprecated.
Disallows the player from logging in, with the given reason

Parameters:
  `result` - New result for disallowing the player
  `message` - Kick message to display to the user

### getKickMessage

@Deprecated @NotNull public @NotNull String getKickMessage()
Deprecated.
in favour of `kickMessage()`
Gets the current kick message that will be used if getResult() != Result.ALLOWED

Returns:
  Current kick message

### setKickMessage

@Deprecated public void setKickMessage(@NotNull @NotNull String message)
Deprecated.
in favour of `kickMessage(net.kyori.adventure.text.Component)`
Sets the kick message to display if getResult() != Result.ALLOWED

Parameters:
  `message` - New kick message

### allow

public void allow()
Deprecated.
Allows the player to log in

### disallow

@Deprecated public void disallow(@NotNull @NotNull PlayerPreLoginEvent.Result result, @NotNull @NotNull String message)
Deprecated.
in favour of `disallow(org.bukkit.event.player.PlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)`
Disallows the player from logging in, with the given reason

Parameters:
  `result` - New result for disallowing the player
  `message` - Kick message to display to the user

### getName

@NotNull public @NotNull String getName()
Deprecated.
Gets the player's name.

Returns:
  the player's name

### getAddress

@NotNull public @NotNull InetAddress getAddress()
Deprecated.
Gets the player IP address.

Returns:
  The IP address

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()
Deprecated.

Specified by:
  `getHandlers` in class `Event`

### getUniqueId

@NotNull public @NotNull UUID getUniqueId()
Deprecated.
Gets the player's unique ID.

Returns:
  The unique ID

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()
Deprecated.