Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.player.AsyncPlayerPreLoginEvent Class Reference
Inheritance diagram for org.bukkit.event.player.AsyncPlayerPreLoginEvent:
org.bukkit.event.Event

Classes

enum  Result
 

Public Member Functions

 AsyncPlayerPreLoginEvent (final String name, final InetAddress ipAddress)
 
 AsyncPlayerPreLoginEvent (final String name, final InetAddress ipAddress, final UUID uniqueId)
 
Result getLoginResult ()
 
PlayerPreLoginEvent.Result getResult ()
 
void setLoginResult (final Result result)
 
void setResult (final PlayerPreLoginEvent.Result result)
 
String getKickMessage ()
 
void setKickMessage (final String message)
 
void allow ()
 
void disallow (final Result result, final String message)
 
void disallow (final PlayerPreLoginEvent.Result result, final String message)
 
String getName ()
 
InetAddress getAddress ()
 
UUID getUniqueId ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Detailed Description

Stores details for players attempting to log in.

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

Definition at line 14 of file AsyncPlayerPreLoginEvent.java.

Member Function Documentation

void org.bukkit.event.player.AsyncPlayerPreLoginEvent.allow ( )

Allows the player to log in

Definition at line 102 of file AsyncPlayerPreLoginEvent.java.

References org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result.ALLOWED.

102  {
103  result = Result.ALLOWED;
104  message = "";
105  }
void org.bukkit.event.player.AsyncPlayerPreLoginEvent.disallow ( final Result  result,
final String  message 
)

Disallows the player from logging in, with the given reason

Parameters
resultNew result for disallowing the player
messageKick message to display to the user

Definition at line 113 of file AsyncPlayerPreLoginEvent.java.

113  {
114  this.result = result;
115  this.message = message;
116  }
void org.bukkit.event.player.AsyncPlayerPreLoginEvent.disallow ( final PlayerPreLoginEvent.Result  result,
final String  message 
)

Disallows the player from logging in, with the given reason

Parameters
resultNew result for disallowing the player
messageKick message to display to the user
Deprecated:
This method uses a deprecated enum from PlayerPreLoginEvent
See also
#disallow(Result, String)

Definition at line 128 of file AsyncPlayerPreLoginEvent.java.

128  {
129  this.result = result == null ? null : Result.valueOf(result.name());
130  this.message = message;
131  }
InetAddress org.bukkit.event.player.AsyncPlayerPreLoginEvent.getAddress ( )

Gets the player IP address.

Returns
The IP address

Definition at line 147 of file AsyncPlayerPreLoginEvent.java.

147  {
148  return ipAddress;
149  }
String org.bukkit.event.player.AsyncPlayerPreLoginEvent.getKickMessage ( )

Gets the current kick message that will be used if getResult() != Result.ALLOWED

Returns
Current kick message

Definition at line 86 of file AsyncPlayerPreLoginEvent.java.

86  {
87  return message;
88  }
Result org.bukkit.event.player.AsyncPlayerPreLoginEvent.getLoginResult ( )

Gets the current result of the login, as an enum

Returns
Current Result of the login

Definition at line 41 of file AsyncPlayerPreLoginEvent.java.

41  {
42  return result;
43  }
String org.bukkit.event.player.AsyncPlayerPreLoginEvent.getName ( )

Gets the player's name.

Returns
the player's name

Definition at line 138 of file AsyncPlayerPreLoginEvent.java.

138  {
139  return name;
140  }
PlayerPreLoginEvent.Result org.bukkit.event.player.AsyncPlayerPreLoginEvent.getResult ( )

Gets the current result of the login, as an enum

Returns
Current Result of the login
Deprecated:
This method uses a deprecated enum from PlayerPreLoginEvent
See also
getLoginResult()

Definition at line 54 of file AsyncPlayerPreLoginEvent.java.

54  {
55  return result == null ? null : result.old();
56  }
UUID org.bukkit.event.player.AsyncPlayerPreLoginEvent.getUniqueId ( )

Gets the player's unique ID.

Returns
The unique ID

Definition at line 156 of file AsyncPlayerPreLoginEvent.java.

156  {
157  return uniqueId;
158  }
void org.bukkit.event.player.AsyncPlayerPreLoginEvent.setKickMessage ( final String  message)

Sets the kick message to display if getResult() != Result.ALLOWED

Parameters
messageNew kick message

Definition at line 95 of file AsyncPlayerPreLoginEvent.java.

95  {
96  this.message = message;
97  }
void org.bukkit.event.player.AsyncPlayerPreLoginEvent.setLoginResult ( final Result  result)

Sets the new result of the login, as an enum

Parameters
resultNew result to set

Definition at line 63 of file AsyncPlayerPreLoginEvent.java.

63  {
64  this.result = result;
65  }
void org.bukkit.event.player.AsyncPlayerPreLoginEvent.setResult ( final PlayerPreLoginEvent.Result  result)

Sets the new result of the login, as an enum

Parameters
resultNew result to set
Deprecated:
This method uses a deprecated enum from PlayerPreLoginEvent
See also
#setLoginResult(Result)

Definition at line 76 of file AsyncPlayerPreLoginEvent.java.

76  {
77  this.result = result == null ? null : Result.valueOf(result.name());
78  }

The documentation for this class was generated from the following file: