2022-03-01 06:43:03 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: MCMDEV <john-m.1@gmx.de>
|
|
|
|
Date: Fri, 24 Sep 2021 17:59:21 +0200
|
|
|
|
Subject: [PATCH] Added getHostname to AsyncPlayerPreLoginEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
2022-06-09 23:11:43 +02:00
|
|
|
index f18c24266eecdc3d108c6523da6b75985bba291a..89f8690848db712f382d1a1e5b75053262d991ac 100644
|
2022-03-01 06:43:03 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
2022-06-09 23:11:43 +02:00
|
|
|
@@ -450,7 +450,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
2022-03-01 06:43:03 +01:00
|
|
|
|
|
|
|
// Paper start
|
|
|
|
com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(ServerLoginPacketListenerImpl.this.gameProfile);
|
|
|
|
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile); // Paper - add rawAddress
|
|
|
|
+ AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile, ServerLoginPacketListenerImpl.this.hostname); // Paper - add rawAddress & hostname
|
|
|
|
server.getPluginManager().callEvent(asyncEvent);
|
|
|
|
profile = asyncEvent.getPlayerProfile();
|
|
|
|
profile.complete(true); // Paper - setPlayerProfileAPI
|