From 4bcbe2d235a9e3c6e74ccf3d7b754df336a938fe Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 19 Mar 2012 15:01:53 -0400 Subject: [PATCH] [Bleeding] Add Chest.getBlockInventory() for convenience; this always returns a single chest inventory. Addresses BUKKIT-1247 --- src/main/java/org/bukkit/craftbukkit/block/CraftChest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index face2c8f38..226be4f072 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -22,6 +22,10 @@ public class CraftChest extends CraftBlockState implements Chest { chest = (TileEntityChest) world.getTileEntityAt(getX(), getY(), getZ()); } + public Inventory getBlockInventory() { + return new CraftInventory(chest); + } + public Inventory getInventory() { int x = getX(); int y = getY();