public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final InetAddress rawAddress, @NotNull final UUID uniqueId, @NotNull PlayerProfile profile) {
+ public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final InetAddress rawAddress, @NotNull final UUID uniqueId, @NotNull PlayerProfile profile, @NotNull String hostname) {
+ // Paper end - Add hostname
super(true);
this.profile = profile;
// Paper end
@@ -76,6 +84,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
this.ipAddress = ipAddress;
this.rawAddress = rawAddress; // Paper
//this.uniqueId = uniqueId; // Paper - Not used anymore
+ this.hostname = hostname; // Paper - Add hostname
}
/**
@@ -261,6 +270,19 @@ public class AsyncPlayerPreLoginEvent extends Event {
return profile.getId(); // Paper
}
+ // Paper start
+ /**
+ * Gets the hostname that the player used to connect to the server, or