From 132ee0454229477f2403d445758594c3566405bc Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 19 Mar 2012 15:02:10 -0400 Subject: [Bleeding] Add Chest.getBlockInventory() for convenience; this always returns a single chest inventory. Addresses BUKKIT-1247 --- src/main/java/org/bukkit/block/Chest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java index f33cce6f..2d940e56 100644 --- a/src/main/java/org/bukkit/block/Chest.java +++ b/src/main/java/org/bukkit/block/Chest.java @@ -1,6 +1,16 @@ package org.bukkit.block; +import org.bukkit.inventory.Inventory; + /** * Represents a chest. */ -public interface Chest extends BlockState, ContainerBlock {} +public interface Chest extends BlockState, ContainerBlock { + /** + * Returns the chest's inventory. If this is a double chest, it returns just + * the portion of the inventory linked to this half of the chest. + * + * @return The inventory. + */ + Inventory getBlockInventory(); +} -- cgit v1.2.3