mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 08:38:45 +01:00
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From 4d8116a77923aebfa7d45af006b2dc0c4bf9babf 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 InventoryEnderChest opened
|
|
by plugins
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
index ac81d3f86b..f50bae0123 100644
|
|
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
|
@@ -5,7 +5,7 @@ import org.bukkit.inventory.InventoryHolder;
|
|
|
|
public class InventoryEnderChest extends InventorySubcontainer {
|
|
|
|
- private TileEntityEnderChest a;
|
|
+ private TileEntityEnderChest a; public TileEntityEnderChest getTileEntity() { return a; } // Paper - OBFHELPER
|
|
// CraftBukkit start
|
|
private final EntityHuman owner;
|
|
|
|
@@ -15,6 +15,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
|
|
|
@Override
|
|
public Location getLocation() {
|
|
+ if (getTileEntity() == null) return null; // Paper - return null if there is no TE bound (opened by plugin)
|
|
return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
|
|
}
|
|
|
|
--
|
|
2.19.0
|
|
|