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 classPlayerPreLoginEvent.ResultDeprecated.Basic kick reasons for communicating to plugins -
Constructor Summary
Constructors Constructor Description PlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress)Deprecated.PlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress, java.util.UUID uniqueId)Deprecated. -
Method Summary
Modifier and Type Method Description voidallow()Deprecated.Allows the player to log invoiddisallow(PlayerPreLoginEvent.Result result, java.lang.String message)Deprecated.Disallows the player from logging in, with the given reasonjava.net.InetAddressgetAddress()Deprecated.Gets the player IP address.static HandlerListgetHandlerList()Deprecated.HandlerListgetHandlers()Deprecated.java.lang.StringgetKickMessage()Deprecated.Gets the current kick message that will be used if getResult() != Result.ALLOWEDjava.lang.StringgetName()Deprecated.Gets the player's name.PlayerPreLoginEvent.ResultgetResult()Deprecated.Gets the current result of the login, as an enumjava.util.UUIDgetUniqueId()Deprecated.Gets the player's unique ID.voidsetKickMessage(java.lang.String message)Deprecated.Sets the kick message to display if getResult() != Result.ALLOWEDvoidsetResult(PlayerPreLoginEvent.Result result)Deprecated.Sets the new result of the login, as an enum
-
Constructor Details
-
PlayerPreLoginEvent
@Deprecated public PlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress)Deprecated. -
PlayerPreLoginEvent
public PlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress, java.util.UUID uniqueId)Deprecated.
-
-
Method Details
-
getResult
Deprecated.Gets the current result of the login, as an enum- Returns:
- Current Result of the login
-
setResult
Deprecated.Sets the new result of the login, as an enum- Parameters:
result- New result to set
-
getKickMessage
public java.lang.String getKickMessage()Deprecated.Gets the current kick message that will be used if getResult() != Result.ALLOWED- Returns:
- Current kick message
-
setKickMessage
public void setKickMessage(java.lang.String message)Deprecated.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.Disallows the player from logging in, with the given reason- Parameters:
result- New result for disallowing the playermessage- Kick message to display to the user
-
getName
public java.lang.String getName()Deprecated.Gets the player's name.- Returns:
- the player's name
-
getAddress
public java.net.InetAddress getAddress()Deprecated.Gets the player IP address.- Returns:
- The IP address
-
getHandlers
Deprecated.- Specified by:
getHandlersin classEvent
-
getUniqueId
public java.util.UUID getUniqueId()Deprecated.Gets the player's unique ID.- Returns:
- The unique ID
-
getHandlerList
Deprecated.
-