geforkt von Mirrors/Paper
22 Zeilen
956 B
Diff
22 Zeilen
956 B
Diff
From f8b50e2741cee621d2812279b607ae395fe93e75 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sat, 10 Mar 2018 13:03:49 +0000
|
|
Subject: [PATCH] Fix NPE when getting location from players EnderChest
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
index cd7de2b53..3bd69bf86 100644
|
|
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
@@ -15,6 +15,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
|
|
|
@Override
|
|
public Location getLocation() {
|
|
+ if (a == null) return owner.getBukkitEntity().getLocation(); // Paper - return Player location if there is no TE
|
|
return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
|
|
}
|
|
|
|
--
|
|
2.16.2
|
|
|