summaryrefslogtreecommitdiffstats
path: root/nms-patches/InventoryEnderChest.patch
blob: 18f4a07b8574b7338e9d3dfe3ed5900d18783504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/net/minecraft/server/InventoryEnderChest.java
+++ b/net/minecraft/server/InventoryEnderChest.java
@@ -1,11 +1,27 @@
 package net.minecraft.server;
 
+import org.bukkit.Location;
+import org.bukkit.inventory.InventoryHolder;
+
 public class InventoryEnderChest extends InventorySubcontainer {
 
     private TileEntityEnderChest a;
+    // CraftBukkit start
+    private final EntityHuman owner;
+
+    public InventoryHolder getBukkitOwner() {
+        return owner.getBukkitEntity();
+    }
+
+    @Override
+    public Location getLocation() {
+        return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
+    }
 
-    public InventoryEnderChest() {
+    public InventoryEnderChest(EntityHuman owner) {
         super("container.enderchest", false, 27);
+        this.owner = owner;
+        // CraftBukkit end
     }
 
     public void a(TileEntityEnderChest tileentityenderchest) {