Package net.md_5.bungee.api.event

# Class ServerDisconnectEvent

java.lang.Object
net.md_5.bungee.api.plugin.Event
net.md_5.bungee.api.event.ServerDisconnectEvent

public class ServerDisconnectEvent extends Event
Called when the player is disconnected from a server, for example during server switching. If the player is kicked from a server, `ServerKickEvent` will be called instead.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServerDisconnectEvent(@NonNull ProxiedPlayer player, @NonNull ServerInfo target)`
  Creates a new `ServerDisconnectEvent` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `@NonNull ProxiedPlayer`
  `getPlayer()`
  Player disconnecting from a server.
  `@NonNull ServerInfo`
  `getTarget()`
  Server the player is disconnecting from.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class net.md_5.bungee.api.plugin.Event

  `postCall`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ServerDisconnectEvent

    public ServerDisconnectEvent(@NonNull @NonNull ProxiedPlayer player, @NonNull @NonNull ServerInfo target)
    Creates a new `ServerDisconnectEvent` instance.
    Parameters:
      `player` - Player disconnecting from a server.
      `target` - Server the player is disconnecting from.

- ## Method Details

  - ### getPlayer

    @NonNull public @NonNull ProxiedPlayer getPlayer()
    Player disconnecting from a server.

  - ### getTarget

    @NonNull public @NonNull ServerInfo getTarget()
    Server the player is disconnecting from.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`