| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerLoginEvent
public class PlayerLoginEvent
Stores details for players attempting to log in
| Nested Class Summary | |
|---|---|
static class | 
PlayerLoginEvent.Result
Basic kick reasons for communicating to plugins  | 
| Field Summary | 
|---|
| Fields inherited from class org.bukkit.event.player.PlayerEvent | 
|---|
player | 
| Constructor Summary | |
|---|---|
PlayerLoginEvent(Player player)
Deprecated. Address should be provided in other constructor  | 
|
PlayerLoginEvent(Player player,
                                 PlayerLoginEvent.Result result,
                                 String message)
Deprecated. Address and hostname should be provided in other constructor  | 
|
PlayerLoginEvent(Player player,
                                 String hostname)
Deprecated. Address should be provided in other constructor  | 
|
PlayerLoginEvent(Player player,
                                 String hostname,
                                 InetAddress address)
This constructor defaults message to an empty string, and result to ALLOWED  | 
|
PlayerLoginEvent(Player player,
                                 String hostname,
                                 InetAddress address,
                                 PlayerLoginEvent.Result result,
                                 String message)
This constructor pre-configures the event with a result and message  | 
|
| Method Summary | |
|---|---|
 void | 
allow()
Allows the player to log in  | 
 void | 
disallow(PlayerLoginEvent.Result result,
                 String message)
Disallows the player from logging in, with the given reason  | 
 InetAddress | 
getAddress()
Gets the InetAddress for the Player associated with this event. | 
static HandlerList | 
getHandlerList()
 | 
 HandlerList | 
getHandlers()
 | 
 String | 
getHostname()
Gets the hostname that the player used to connect to the server, or blank if unknown  | 
 String | 
getKickMessage()
Gets the current kick message that will be used if getResult() != Result.ALLOWED  | 
 PlayerLoginEvent.Result | 
getResult()
Gets the current result of the login, as an enum  | 
 void | 
setKickMessage(String message)
Sets the kick message to display if getResult() != Result.ALLOWED  | 
 void | 
setResult(PlayerLoginEvent.Result result)
Sets the new result of the login, as an enum  | 
| Methods inherited from class org.bukkit.event.player.PlayerEvent | 
|---|
getPlayer | 
| Methods inherited from class org.bukkit.event.Event | 
|---|
getEventName, isAsynchronous | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
@Deprecated public PlayerLoginEvent(Player player)
@Deprecated
public PlayerLoginEvent(Player player,
                                   String hostname)
public PlayerLoginEvent(Player player,
                        String hostname,
                        InetAddress address)
player - The Player for this eventhostname - The hostname that was used to connect to the serveraddress - The address the player used to connect, provided for
     timing issues
@Deprecated
public PlayerLoginEvent(Player player,
                                   PlayerLoginEvent.Result result,
                                   String message)
public PlayerLoginEvent(Player player,
                        String hostname,
                        InetAddress address,
                        PlayerLoginEvent.Result result,
                        String message)
player - The Player for this eventhostname - The hostname that was used to connect to the serveraddress - The address the player used to connect, provided for
     timing issuesresult - The result status for this eventmessage - The message to be displayed if result denies login| Method Detail | 
|---|
public PlayerLoginEvent.Result getResult()
public void setResult(PlayerLoginEvent.Result result)
result - New result to setpublic String getKickMessage()
public void setKickMessage(String message)
message - New kick messagepublic String getHostname()
public void allow()
public void disallow(PlayerLoginEvent.Result result,
                     String message)
result - New result for disallowing the playermessage - Kick message to display to the userpublic InetAddress getAddress()
InetAddress for the Player associated with this event.
 This method is provided as a workaround for player.getAddress()
 returning null during PlayerLoginEvent.
public HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||