Package com.destroystokyo.paper.event.player

# Class PlayerConnectionCloseEvent

java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent

public class PlayerConnectionCloseEvent extends Event

This event is invoked when a player has disconnected. It is guaranteed that, if the server is in online-mode, that the provided uuid and username have been validated.

The event is invoked for players who have not yet logged into the world, whereas `PlayerQuitEvent` is only invoked on players who have logged into the world.

The event is invoked for players who have already logged into the world, although whether or not the player exists in the world at the time of firing is undefined. (That is, whether the plugin can retrieve a Player object using the event parameters is undefined). However, it is guaranteed that this event is invoked AFTER `PlayerQuitEvent`, if the player has already logged into the world.

This event is guaranteed to never fire unless `AsyncPlayerPreLoginEvent` has been fired beforehand, and this event may not be called in parallel with `AsyncPlayerPreLoginEvent` for the same connection.

Cancelling the `AsyncPlayerPreLoginEvent` guarantees the corresponding `PlayerConnectionCloseEvent` is never called.

The event may be invoked asynchronously or synchronously. Plugins should check `Event.isAsynchronous()` and handle accordingly.

## Nested Class Summary

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

`Event.Result`

## Constructor Summary

Constructors
Constructor
Description
`PlayerConnectionCloseEvent(@NotNull UUID playerUniqueId, @NotNull String playerName, @NotNull InetAddress ipAddress, boolean async)`

## Method Summary

Modifier and Type
Method
Description
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull InetAddress`
`getIpAddress()`
Returns the player's IP address.
`@NotNull String`
`getPlayerName()`
Returns the name of the player disconnecting.
`@NotNull UUID`
`getPlayerUniqueId()`
Returns the `UUID` of the player disconnecting.

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

### PlayerConnectionCloseEvent

public PlayerConnectionCloseEvent(@NotNull @NotNull UUID playerUniqueId, @NotNull @NotNull String playerName, @NotNull @NotNull InetAddress ipAddress, boolean async)

## Method Details

### getPlayerUniqueId

@NotNull public @NotNull UUID getPlayerUniqueId()
Returns the `UUID` of the player disconnecting.

### getPlayerName

@NotNull public @NotNull String getPlayerName()
Returns the name of the player disconnecting.

### getIpAddress

@NotNull public @NotNull InetAddress getIpAddress()
Returns the player's IP address.

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()