From e14c9acbec53f6484da2a8f040b16cab466e810f Mon Sep 17 00:00:00 2001 From: Martoph Date: Fri, 28 Aug 2020 12:28:06 +1000 Subject: [PATCH] SPIGOT-6113: Ender Pearls thrown into portals that lead to disabled dimensions crash the server --- nms-patches/EntityEnderPearl.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/EntityEnderPearl.patch b/nms-patches/EntityEnderPearl.patch index fff8bbe05c..69309292d6 100644 --- a/nms-patches/EntityEnderPearl.patch +++ b/nms-patches/EntityEnderPearl.patch @@ -60,3 +60,12 @@ } } else if (entity != null) { entity.enderTeleportTo(this.locX(), this.locY(), this.locZ()); +@@ -80,7 +100,7 @@ + public Entity b(WorldServer worldserver) { + Entity entity = this.getShooter(); + +- if (entity != null && entity.world.getDimensionKey() != worldserver.getDimensionKey()) { ++ if (entity != null && worldserver != null && entity.world.getDimensionKey() != worldserver.getDimensionKey()) { // CraftBukkit - SPIGOT-6113 + this.setShooter((Entity) null); + } +