summaryrefslogtreecommitdiffstats
path: root/nms-patches/TileEntityContainer.patch
blob: b01f8025896dac9d3d2ea79cfec769c569e99e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/net/minecraft/server/TileEntityContainer.java
+++ b/net/minecraft/server/TileEntityContainer.java
@@ -34,4 +34,12 @@
     public void setLock(ChestLock chestlock) {
         this.a = chestlock;
     }
+
+    // CraftBukkit start
+    @Override
+    public org.bukkit.Location getLocation() {
+        if (world == null) return null;
+        return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ());
+    }
+    // CraftBukkit end
 }