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

Classes

enum  Result
 

Public Member Functions

 PlayerPreLoginEvent (final String name, final InetAddress ipAddress)
 
 PlayerPreLoginEvent (final String name, final InetAddress ipAddress, final UUID uniqueId)
 
Result getResult ()
 
void setResult (final Result result)
 
String getKickMessage ()
 
void setKickMessage (final String message)
 
void allow ()
 
void disallow (final Result result, final String message)
 
String getName ()
 
InetAddress getAddress ()
 
HandlerList getHandlers ()
 
UUID getUniqueId ()
 
- 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

Deprecated:
This event causes synchronization from the login thread; AsyncPlayerPreLoginEvent is preferred to keep the secondary threads asynchronous.

Definition at line 19 of file PlayerPreLoginEvent.java.

Member Function Documentation

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

Allows the player to log in

Definition at line 80 of file PlayerPreLoginEvent.java.

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

80  {
81  result = Result.ALLOWED;
82  message = "";
83  }
void org.bukkit.event.player.PlayerPreLoginEvent.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 91 of file PlayerPreLoginEvent.java.

91  {
92  this.result = result;
93  this.message = message;
94  }
InetAddress org.bukkit.event.player.PlayerPreLoginEvent.getAddress ( )

Gets the player IP address.

Returns
The IP address

Definition at line 110 of file PlayerPreLoginEvent.java.

110  {
111  return ipAddress;
112  }
String org.bukkit.event.player.PlayerPreLoginEvent.getKickMessage ( )

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

Returns
Current kick message

Definition at line 64 of file PlayerPreLoginEvent.java.

64  {
65  return message;
66  }
String org.bukkit.event.player.PlayerPreLoginEvent.getName ( )

Gets the player's name.

Returns
the player's name

Definition at line 101 of file PlayerPreLoginEvent.java.

101  {
102  return name;
103  }
Result org.bukkit.event.player.PlayerPreLoginEvent.getResult ( )

Gets the current result of the login, as an enum

Returns
Current Result of the login

Definition at line 45 of file PlayerPreLoginEvent.java.

45  {
46  return result;
47  }
UUID org.bukkit.event.player.PlayerPreLoginEvent.getUniqueId ( )

Gets the player's unique ID.

Returns
The unique ID

Definition at line 124 of file PlayerPreLoginEvent.java.

124  {
125  return uniqueId;
126  }
void org.bukkit.event.player.PlayerPreLoginEvent.setKickMessage ( final String  message)

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

Parameters
messageNew kick message

Definition at line 73 of file PlayerPreLoginEvent.java.

73  {
74  this.message = message;
75  }
void org.bukkit.event.player.PlayerPreLoginEvent.setResult ( final Result  result)

Sets the new result of the login, as an enum

Parameters
resultNew result to set

Definition at line 54 of file PlayerPreLoginEvent.java.

54  {
55  this.result = result;
56  }

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