SPIGOT-4634: Make Inventory iteration behaviour explicit

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2019-02-25 19:13:50 +11:00
parent 3ce97266e5
commit 4607199e45

View file

@ -12,6 +12,16 @@ import org.bukkit.event.inventory.InventoryType;
/**
* Interface to the various inventories. Behavior relating to {@link
* Material#AIR} is unspecified.
*
* <br>
* <b>Note that whilst {@link #iterator()} deals with the entire inventory, add
* / contains / remove methods deal only with the storage contents.</b>
* <br>
* <b>Consider using {@link #getContents()} and {@link #getStorageContents()} for
* specific iteration.</b>
*
* @see #getContents()
* @see #getStorageContents()
*/
public interface Inventory extends Iterable<ItemStack> {