![]() |
Bukkit
1.4.7-R1.0
|
Stores details for players attempting to log in. More...
Inheritance diagram for org.bukkit.event.player.PlayerLoginEvent:
Collaboration diagram for org.bukkit.event.player.PlayerLoginEvent:Classes | |
| enum | Result |
| Basic kick reasons for communicating to plugins. More... | |
Public Member Functions | |
| PlayerLoginEvent (final Player player) | |
| PlayerLoginEvent (final Player player, final String hostname) | |
| PlayerLoginEvent (final Player player, final String hostname, final InetAddress address) | |
| This constructor defaults message to an empty string, and result to ALLOWED. | |
| PlayerLoginEvent (final Player player, final Result result, final String message) | |
| PlayerLoginEvent (final Player player, String hostname, final InetAddress address, final Result result, final String message) | |
| This constructor pre-configures the event with a result and message. | |
| 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. | |
| String | getHostname () |
| Gets the hostname that the player used to connect to the server, or blank if unknown. | |
| 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. | |
| InetAddress | getAddress () |
| Gets the InetAddress for the Player associated with this event. | |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.player.PlayerEvent | |
| PlayerEvent (final Player who) | |
| final Player | getPlayer () |
| Returns the player involved in this event. | |
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 () |
Additional Inherited Members | |
Protected Attributes inherited from org.bukkit.event.player.PlayerEvent | |
| Player | player |
Stores details for players attempting to log in.
Definition at line 11 of file PlayerLoginEvent.java.
| org.bukkit.event.player.PlayerLoginEvent.PlayerLoginEvent | ( | final Player | player | ) |
Definition at line 22 of file PlayerLoginEvent.java.
References org.bukkit.event.player.PlayerEvent.player.
| org.bukkit.event.player.PlayerLoginEvent.PlayerLoginEvent | ( | final Player | player, |
| final String | hostname | ||
| ) |
Definition at line 30 of file PlayerLoginEvent.java.
References org.bukkit.event.player.PlayerEvent.player.
| org.bukkit.event.player.PlayerLoginEvent.PlayerLoginEvent | ( | final Player | player, |
| final String | hostname, | ||
| final InetAddress | address | ||
| ) |
This constructor defaults message to an empty string, and result to ALLOWED.
| player | The Player for this event |
| hostname | The hostname that was used to connect to the server |
| address | The address the player used to connect, provided for timing issues |
Definition at line 41 of file PlayerLoginEvent.java.
| org.bukkit.event.player.PlayerLoginEvent.PlayerLoginEvent | ( | final Player | player, |
| final Result | result, | ||
| final String | message | ||
| ) |
Definition at line 51 of file PlayerLoginEvent.java.
References org.bukkit.event.player.PlayerEvent.player.
| org.bukkit.event.player.PlayerLoginEvent.PlayerLoginEvent | ( | final Player | player, |
| String | hostname, | ||
| final InetAddress | address, | ||
| final Result | result, | ||
| final String | message | ||
| ) |
This constructor pre-configures the event with a result and message.
| player | The Player for this event |
| hostname | The hostname that was used to connect to the server |
| address | The address the player used to connect, provided for timing issues |
| result | The result status for this event |
| message | The message to be displayed if result denies login |
Definition at line 64 of file PlayerLoginEvent.java.
References org.bukkit.event.player.PlayerEvent.player.
| void org.bukkit.event.player.PlayerLoginEvent.allow | ( | ) |
Allows the player to log in.
Definition at line 118 of file PlayerLoginEvent.java.
| void org.bukkit.event.player.PlayerLoginEvent.disallow | ( | final Result | result, |
| final String | message | ||
| ) |
Disallows the player from logging in, with the given reason.
| result | New result for disallowing the player |
| message | Kick message to display to the user |
Definition at line 129 of file PlayerLoginEvent.java.
| InetAddress org.bukkit.event.player.PlayerLoginEvent.getAddress | ( | ) |
Gets the InetAddress for the Player associated with this event.
This method is provided as a workaround for player.getAddress() returning null during PlayerLoginEvent.
Definition at line 142 of file PlayerLoginEvent.java.
|
static |
Definition at line 151 of file PlayerLoginEvent.java.
|
virtual |
Implements org.bukkit.event.Event.
Definition at line 147 of file PlayerLoginEvent.java.
| String org.bukkit.event.player.PlayerLoginEvent.getHostname | ( | ) |
Gets the hostname that the player used to connect to the server, or blank if unknown.
Definition at line 111 of file PlayerLoginEvent.java.
| String org.bukkit.event.player.PlayerLoginEvent.getKickMessage | ( | ) |
Gets the current kick message that will be used if getResult() != Result.ALLOWED.
Definition at line 93 of file PlayerLoginEvent.java.
| Result org.bukkit.event.player.PlayerLoginEvent.getResult | ( | ) |
Gets the current result of the login, as an enum.
Definition at line 75 of file PlayerLoginEvent.java.
| void org.bukkit.event.player.PlayerLoginEvent.setKickMessage | ( | final String | message | ) |
Sets the kick message to display if getResult() != Result.ALLOWED.
| message | New kick message |
Definition at line 102 of file PlayerLoginEvent.java.
| void org.bukkit.event.player.PlayerLoginEvent.setResult | ( | final Result | result | ) |
Sets the new result of the login, as an enum.
| result | New result to set |
Definition at line 84 of file PlayerLoginEvent.java.