Skip to content

Commit

Permalink
Readd missed line
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jan 14, 2024
1 parent c151c95 commit 93a848c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions patches/server/0180-Player.setPlayerProfile-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 93a848c

Please sign in to comment.