[Bleeding] Added getting the hostname a player used to log in. Addresses BUKKIT-984
This commit is contained in:
parent
450b20bdc2
commit
bc60e182cd
@ -10,11 +10,17 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Result result = Result.ALLOWED;
|
||||
private String message = "";
|
||||
private String hostname = "";
|
||||
|
||||
public PlayerLoginEvent(final Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
public PlayerLoginEvent(final Player player, final String hostname) {
|
||||
this(player);
|
||||
this.hostname = hostname;
|
||||
}
|
||||
|
||||
public PlayerLoginEvent(final Player player, final Result result, final String message) {
|
||||
this(player);
|
||||
this.result = result;
|
||||
@ -57,6 +63,15 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the hostname that the player used to connect to the server, or blank if unknown
|
||||
*
|
||||
* @return The hostname
|
||||
*/
|
||||
public String getHostname() {
|
||||
return hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the player to log in
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user