summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-02-04 20:33:06 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-02-04 20:33:06 +0000
commit7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88 (patch)
treeca085cc4dc5e6587895f19735ec45059a9811eb4
parentbdd52c989299fc32d81ccbee200f6e4aeb545f93 (diff)
downloadcraftbukkit-7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88.tar
craftbukkit-7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88.tar.gz
craftbukkit-7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88.tar.lz
craftbukkit-7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88.tar.xz
craftbukkit-7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88.zip
Handle new players correctly
-rw-r--r--nms-patches/PlayerList.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch
index 8d78f95f..f3b868c8 100644
--- a/nms-patches/PlayerList.patch
+++ b/nms-patches/PlayerList.patch
@@ -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;
+ }