summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-25 21:21:55 +1000
committermd_5 <git@md-5.net>2016-06-25 21:21:55 +1000
commit4c1e9342cbe16f4c83d9360e3a21283d3fd80e50 (patch)
treeed5b89709e01e9c0fe1dbca185e670063df7aab8 /src/main/java/org/bukkit
parentf068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad (diff)
downloadcraftbukkit-4c1e9342cbe16f4c83d9360e3a21283d3fd80e50.tar
craftbukkit-4c1e9342cbe16f4c83d9360e3a21283d3fd80e50.tar.gz
craftbukkit-4c1e9342cbe16f4c83d9360e3a21283d3fd80e50.tar.lz
craftbukkit-4c1e9342cbe16f4c83d9360e3a21283d3fd80e50.tar.xz
craftbukkit-4c1e9342cbe16f4c83d9360e3a21283d3fd80e50.zip
SPIGOT-1039: Improve DoubleChest semantics
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
index 87252cad..24e25882 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
@@ -8,6 +8,7 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import net.minecraft.server.InventoryLargeChest;
+import org.bukkit.Location;
public class CraftInventoryDoubleChest extends CraftInventory implements DoubleChestInventory {
private final CraftInventory left;
@@ -59,4 +60,9 @@ public class CraftInventoryDoubleChest extends CraftInventory implements DoubleC
public DoubleChest getHolder() {
return new DoubleChest(this);
}
+
+ @Override
+ public Location getLocation() {
+ return getLeftSide().getLocation().add(getRightSide().getLocation()).multiply(0.5);
+ }
}