Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.event.player.PlayerPreLoginEvent Class Reference

Stores details for players attempting to log in. More...

+ Inheritance diagram for org.bukkit.event.player.PlayerPreLoginEvent:
+ Collaboration diagram for org.bukkit.event.player.PlayerPreLoginEvent:

Classes

enum  Result
 Basic kick reasons for communicating to plugins. More...
 

Public Member Functions

 PlayerPreLoginEvent (final String name, final InetAddress ipAddress)
 
Result getResult ()
 Gets the current result of the login, as an enum.
 
void setResult (final Result result)
 Sets the new result of the login, as an enum.
 
String getKickMessage ()
 Gets the current kick message that will be used if getResult() != Result.ALLOWED.
 
void setKickMessage (final String message)
 Sets the kick message to display if getResult() != Result.ALLOWED.
 
void allow ()
 Allows the player to log in.
 
void disallow (final Result result, final String message)
 Disallows the player from logging in, with the given reason.
 
String getName ()
 Gets the player's name.
 
InetAddress getAddress ()
 Gets the player IP address.
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 The default constructor is defined for cleaner code.
 
 Event (boolean isAsync)
 This constructor is used to explicitly declare an event as synchronous or asynchronous.
 
String getEventName ()
 
final boolean isAsynchronous ()
 Any custom event that should not by synchronized with other events must use the specific constructor.
 

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 15 of file PlayerPreLoginEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.player.PlayerPreLoginEvent.PlayerPreLoginEvent ( final String  name,
final InetAddress  ipAddress 
)

Definition at line 22 of file PlayerPreLoginEvent.java.

Member Function Documentation

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

Allows the player to log in.

Definition at line 68 of file PlayerPreLoginEvent.java.

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 79 of file PlayerPreLoginEvent.java.

InetAddress org.bukkit.event.player.PlayerPreLoginEvent.getAddress ( )

Gets the player IP address.

Returns
The IP address

Definition at line 98 of file PlayerPreLoginEvent.java.

static HandlerList org.bukkit.event.player.PlayerPreLoginEvent.getHandlerList ( )
static

Definition at line 107 of file PlayerPreLoginEvent.java.

HandlerList org.bukkit.event.player.PlayerPreLoginEvent.getHandlers ( )
virtual

Implements org.bukkit.event.Event.

Definition at line 103 of file PlayerPreLoginEvent.java.

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 52 of file PlayerPreLoginEvent.java.

String org.bukkit.event.player.PlayerPreLoginEvent.getName ( )

Gets the player's name.

Returns
the player's name

Definition at line 89 of file PlayerPreLoginEvent.java.

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 34 of file PlayerPreLoginEvent.java.

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 61 of file PlayerPreLoginEvent.java.

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 43 of file PlayerPreLoginEvent.java.


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