summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-02-05 10:01:47 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-02-05 10:01:47 +0000
commit43207df1df3d1f150e075ec35b592e4602099c73 (patch)
tree9d97842ba7e52e17dbd3c83ec980433d885382a0
parent7bdb8f9f215a1bc64daaf6490a1e0e184dcb2f88 (diff)
downloadcraftbukkit-43207df1df3d1f150e075ec35b592e4602099c73.tar
craftbukkit-43207df1df3d1f150e075ec35b592e4602099c73.tar.gz
craftbukkit-43207df1df3d1f150e075ec35b592e4602099c73.tar.lz
craftbukkit-43207df1df3d1f150e075ec35b592e4602099c73.tar.xz
craftbukkit-43207df1df3d1f150e075ec35b592e4602099c73.zip
Fix some null pointer issues in ThreadPlayerLookupUUID
-rw-r--r--nms-patches/ThreadPlayerLookupUUID.patch15
1 files changed, 12 insertions, 3 deletions
diff --git a/nms-patches/ThreadPlayerLookupUUID.patch b/nms-patches/ThreadPlayerLookupUUID.patch
index 56621aeb..6c8da99e 100644
--- a/nms-patches/ThreadPlayerLookupUUID.patch
+++ b/nms-patches/ThreadPlayerLookupUUID.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/ThreadPlayerLookupUUID.java 2014-11-28 17:43:43.385707429 +0000
-+++ src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java 2014-11-28 17:43:20.977707926 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/ThreadPlayerLookupUUID.java 2015-02-05 10:00:43.580949912 +0000
++++ src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java 2015-02-05 10:00:43.580949912 +0000
@@ -5,6 +5,12 @@
import java.math.BigInteger;
import java.util.UUID;
@@ -58,6 +58,15 @@
LoginListener.e().info("UUID of player " + LoginListener.b(this.a).getName() + " is " + LoginListener.b(this.a).getId());
LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT);
} else if (LoginListener.a(this.a).S()) {
+@@ -30,7 +74,7 @@
+ LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT);
+ } else {
+ this.a.disconnect("Failed to verify username!");
+- LoginListener.e().error("Username \'" + LoginListener.b(this.a).getName() + "\' tried to join with an invalid session");
++ LoginListener.e().error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
+ }
+ } catch (AuthenticationUnavailableException authenticationunavailableexception) {
+ if (LoginListener.a(this.a).S()) {
@@ -41,6 +85,11 @@
this.a.disconnect("Authentication servers are down. Please try again later, sorry!");
LoginListener.e().error("Couldn\'t verify username because servers are unavailable");
@@ -65,7 +74,7 @@
+ // CraftBukkit start - catch all exceptions
+ } catch (Exception exception) {
+ this.a.disconnect("Failed to verify username!");
-+ LoginListener.a(this.a).server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + LoginListener.a(this.a).getName(), exception);
++ LoginListener.a(this.a).server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameprofile.getName(), exception);
+ // CraftBukkit end
}