3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Handle new players correctly

Dieser Commit ist enthalten in:
Thinkofdeath 2015-02-04 20:33:06 +00:00
Ursprung bdd52c9892
Commit 7bdb8f9f21

Datei anzeigen

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerList.java 2015-02-04 19:28:55.770168901 +0000
+++ src/main/java/net/minecraft/server/PlayerList.java 2015-02-04 19:28:55.774168901 +0000
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerList.java 2015-02-04 20:32:58.938127185 +0000
+++ src/main/java/net/minecraft/server/PlayerList.java 2015-02-04 20:32:58.942127185 +0000
@@ -18,6 +18,26 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -57,7 +57,7 @@
usercache.a(gameprofile);
NBTTagCompound nbttagcompound = this.a(entityplayer);
+ // CraftBukkit start - Better rename detection
+ if (nbttagcompound.hasKey("bukkit")) {
+ if (nbttagcompound != null && nbttagcompound.hasKey("bukkit")) {
+ NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit");
+ s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
+ }