AsyncPlayerPreLoginEvent

public class AsyncPlayerPreLoginEvent extends Event

Stores details for players attempting to log in.

This event is asynchronous, and not run using main thread.

Constructors

Link copied to clipboard
public void AsyncPlayerPreLoginEvent(String name, InetAddress ipAddress, UUID uniqueId)

Types

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

Properties

Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public final String name
Link copied to clipboard
public final UUID uniqueId

Functions

Link copied to clipboard
public void allow()
Allows the player to log in
Link copied to clipboard
public void disallow(AsyncPlayerPreLoginEvent.Result result, String message)
Disallows the player from logging in, with the given reason
Link copied to clipboard
Gets the player IP address.
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 current kick message that will be used if getResult() != Result.
Link copied to clipboard
Gets the current result of the login, as an enum
Link copied to clipboard
public String getName()
Gets the player's name.
Link copied to clipboard
public UUID getUniqueId()
Gets the player's unique ID.
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
Sets the new result of the login, as an enum