Package net.md_5.bungee.api.event

# Class ServerSwitchEvent

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

public class ServerSwitchEvent extends Event
Called when a player has changed servers.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServerSwitchEvent(ProxiedPlayer player, ServerInfo from)`
  Creates a new `ServerSwitchEvent` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `ServerInfo`
  `getFrom()`
  Server the player is switch from.
  `ProxiedPlayer`
  `getPlayer()`
  Player whom the server is for.
  `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

  - ### ServerSwitchEvent

    public ServerSwitchEvent(ProxiedPlayer player, ServerInfo from)
    Creates a new `ServerSwitchEvent` instance.
    Parameters:
      `player` - Player whom the server is for.
      `from` - Server the player is switch from. May be null if initial proxy connection.

- ## Method Details

  - ### getPlayer

    public ProxiedPlayer getPlayer()
    Player whom the server is for.

  - ### getFrom

    public ServerInfo getFrom()
    Server the player is switch from. May be null if initial proxy connection.

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