diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:30:03 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 08:30:03 +1100 |
commit | 33fbc3d8622d6a0804aeb0a5ff69295d21e95a82 (patch) | |
tree | 5a1545b6518ce6d133e438986b4336b4c5c47081 /src/main/java/org | |
parent | 7898a2a2d2d81308e73e9ed37725f53d7ad37bfc (diff) | |
download | bukkit-33fbc3d8622d6a0804aeb0a5ff69295d21e95a82.tar bukkit-33fbc3d8622d6a0804aeb0a5ff69295d21e95a82.tar.gz bukkit-33fbc3d8622d6a0804aeb0a5ff69295d21e95a82.tar.lz bukkit-33fbc3d8622d6a0804aeb0a5ff69295d21e95a82.tar.xz bukkit-33fbc3d8622d6a0804aeb0a5ff69295d21e95a82.zip |
Add getLocation() to Inventory.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/inventory/Inventory.java | 9 |
1 files changed, 9 insertions, 0 deletions
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<ItemStack> { * @return An iterator. */ public ListIterator<ItemStack> 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(); } |