From 93a848c4b93632233df17f4c1214e57077a56114 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 14 Jan 2024 13:51:41 +0100 Subject: [PATCH] Readd missed line --- patches/server/0180-Player.setPlayerProfile-API.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patches/server/0180-Player.setPlayerProfile-API.patch b/patches/server/0180-Player.setPlayerProfile-API.patch index cce5e09728..932856ea66 100644 --- a/patches/server/0180-Player.setPlayerProfile-API.patch +++ b/patches/server/0180-Player.setPlayerProfile-API.patch @@ -22,10 +22,15 @@ index 9c0440a6e3768ca6300e128da7f1b11a96f10f91..c1c9076be05cd4b0b19d16aabbf0320c if (Float.isNaN(f)) { f = 0; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 58d97fce07ad8f786940c3f5e74e9aaeabe8d261..fd2a8959e9a929ae7ea17dcb554591a6e2b1ac92 100644 +index 58d97fce07ad8f786940c3f5e74e9aaeabe8d261..dd4e97ff4c8fb2d2f251713271f5ac493574fcd9 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -299,7 +299,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -295,11 +295,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + + // Paper start - Add more fields to AsyncPlayerPreLoginEvent + final java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) this.connection.channel.remoteAddress()).getAddress(); +- com.destroystokyo.paper.profile.PlayerProfile profile = org.bukkit.Bukkit.createProfile(uniqueId, playerName); ++ com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile); // Paper - setPlayerProfileAPI AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile, this.connection.hostname); server.getPluginManager().callEvent(asyncEvent); profile = asyncEvent.getPlayerProfile();