geforkt von Mirrors/Paper
[Bleeding] Added getting the hostname a player used to log in. Addresses BUKKIT-984
By: SpaceManiac <tad.hardesty@platymuus.com>
Dieser Commit ist enthalten in:
Ursprung
5e614ba44b
Commit
da80921d52
@ -10,11 +10,17 @@ public class PlayerLoginEvent extends PlayerEvent {
|
|||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private Result result = Result.ALLOWED;
|
private Result result = Result.ALLOWED;
|
||||||
private String message = "";
|
private String message = "";
|
||||||
|
private String hostname = "";
|
||||||
|
|
||||||
public PlayerLoginEvent(final Player player) {
|
public PlayerLoginEvent(final Player player) {
|
||||||
super(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) {
|
public PlayerLoginEvent(final Player player, final Result result, final String message) {
|
||||||
this(player);
|
this(player);
|
||||||
this.result = result;
|
this.result = result;
|
||||||
@ -57,6 +63,15 @@ public class PlayerLoginEvent extends PlayerEvent {
|
|||||||
this.message = message;
|
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
|
* Allows the player to log in
|
||||||
*/
|
*/
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren