summaryrefslogtreecommitdiffstats
path: root/nms-patches/ChatModifier.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ChatModifier.patch')
-rw-r--r--nms-patches/ChatModifier.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/nms-patches/ChatModifier.patch b/nms-patches/ChatModifier.patch
new file mode 100644
index 00000000..b28629d2
--- /dev/null
+++ b/nms-patches/ChatModifier.patch
@@ -0,0 +1,30 @@
+--- ../work/decompile-8eb82bde//net/minecraft/server/ChatModifier.java 2014-12-27 19:28:58.855157429 +0000
++++ src/main/java/net/minecraft/server/ChatModifier.java 2014-12-27 19:28:58.855157429 +0000
+@@ -160,16 +160,18 @@
+ }
+
+ public int hashCode() {
+- int i = this.b.hashCode();
++ // CraftBukkit start - fix npe
++ int i = b == null ? 0 : this.b.hashCode();
+
+- i = 31 * i + this.c.hashCode();
+- i = 31 * i + this.d.hashCode();
+- i = 31 * i + this.e.hashCode();
+- i = 31 * i + this.f.hashCode();
+- i = 31 * i + this.g.hashCode();
+- i = 31 * i + this.h.hashCode();
+- i = 31 * i + this.i.hashCode();
+- i = 31 * i + this.j.hashCode();
++ i = 31 * i + (c == null ? 0 : this.c.hashCode());
++ i = 31 * i + (d == null ? 0 : this.d.hashCode());
++ i = 31 * i + (e == null ? 0 : this.e.hashCode());
++ i = 31 * i + (f == null ? 0 : this.f.hashCode());
++ i = 31 * i + (g == null ? 0 : this.g.hashCode());
++ i = 31 * i + (h == null ? 0 : this.h.hashCode());
++ i = 31 * i + (this.i == null ? 0 : this.i.hashCode());
++ i = 31 * i + (j == null ? 0 : this.j.hashCode());
++ // CraftBukkit end
+ return i;
+ }
+