mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
8ed2992da9
Portion of diff was dropped in the mappings update commit. Also remove the option to remove invalid statistics. The server will automatically do this now as of... 1.13?, our option wasn't even doing anything.
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From cd3976494de750293984da5f012611ef3de358fd 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 ac81d3f86..f50bae012 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.20.0
|
|
|