PlayerLoginEvent

public class PlayerLoginEvent extends PlayerEvent

Stores details for players attempting to log in

Constructors

Link copied to clipboard
public void PlayerLoginEvent(Player player, String hostname, InetAddress address, InetAddress realAddress)
This constructor defaults message to an empty string, and result to ALLOWED
public void PlayerLoginEvent(Player player, String hostname, InetAddress address)
public void PlayerLoginEvent(Player player, String hostname, InetAddress address, PlayerLoginEvent.Result result, String message, InetAddress realAddress)
This constructor pre-configures the event with getClassById result and message

Types

Link copied to clipboard
public enum Result
Basic kick reasons for communicating to plugins

Properties

Link copied to clipboard
public final InetAddress address
Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public final String hostname
Link copied to clipboard
public final InetAddress realAddress
Link copied to clipboard

Functions

Link copied to clipboard
public void allow()
Allows the player to log in
Link copied to clipboard
public void disallow(PlayerLoginEvent.Result result, String message)
Disallows the player from logging in, with the given reason
Link copied to clipboard
Gets the InetAddress for the Player associated with this event.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
Gets the hostname that the player used to connect to the server, or blank if unknown
Link copied to clipboard
Gets the current kick message that will be used if getResult() != Result.
Link copied to clipboard
public final Player getPlayer()
Returns the player involved in this event
Link copied to clipboard
Gets the connection address of this player, regardless of whether it has been spoofed or not.
Link copied to clipboard
Gets the current result of the login, as an enum
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
public void setKickMessage(String message)
Sets the kick message to display if getResult() != Result.
Link copied to clipboard
public void setResult(PlayerLoginEvent.Result result)
Sets the new result of the login, as an enum