From 1663a63de2df7ca41e645b7faf02df5961319667 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 10 Nov 2018 20:30:58 +1100 Subject: SPIGOT-4478: NPE during PlayerLoginEvent recipe manipulation --- nms-patches/RecipeBookServer.patch | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nms-patches/RecipeBookServer.patch b/nms-patches/RecipeBookServer.patch index 3d60bc79..82133174 100644 --- a/nms-patches/RecipeBookServer.patch +++ b/nms-patches/RecipeBookServer.patch @@ -17,3 +17,11 @@ this.a(minecraftkey); this.c(minecraftkey); arraylist.add(minecraftkey); +@@ -61,6 +62,7 @@ + } + + private void a(PacketPlayOutRecipes.Action packetplayoutrecipes_action, EntityPlayer entityplayer, List list) { ++ if (entityplayer.playerConnection == null) return; // SPIGOT-4478 during PlayerLoginEvent + entityplayer.playerConnection.sendPacket(new PacketPlayOutRecipes(packetplayoutrecipes_action, list, Collections.emptyList(), this.c, this.d, this.e, this.f)); + } + -- cgit v1.2.3