From 33fbc3d8622d6a0804aeb0a5ff69295d21e95a82 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 1 Mar 2016 08:30:03 +1100 Subject: Add getLocation() to Inventory. --- src/main/java/org/bukkit/inventory/Inventory.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java index da5d83e0..32838403 100644 --- a/src/main/java/org/bukkit/inventory/Inventory.java +++ b/src/main/java/org/bukkit/inventory/Inventory.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.List; import java.util.ListIterator; +import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.HumanEntity; import org.bukkit.event.inventory.InventoryType; @@ -378,4 +379,12 @@ public interface Inventory extends Iterable { * @return An iterator. */ public ListIterator iterator(int index); + + /** + * Get the location of the block or entity which corresponds to this inventory. May return null if this container + * was custom created or is a virtual / subcontainer. + * + * @return location or null if not applicable. + */ + public Location getLocation(); } -- cgit v1.2.3