diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/inventory/Inventory.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java index b42ffe21..c5dc995c 100644 --- a/src/main/java/org/bukkit/inventory/Inventory.java +++ b/src/main/java/org/bukkit/inventory/Inventory.java @@ -21,6 +21,26 @@ public interface Inventory extends Iterable<ItemStack> { public int getSize(); /** + * @return The maximum stack size for items in this inventory. + */ + public int getMaxStackSize(); + + /** + * This method allows you to change the maximum stack size for an inventory. + * <p><b>Caveats:</b> + * <ul> + * <li>Not all inventories respect this value. + * <li>Stacks larger than 127 may be clipped when the world is saved. + * <li>This value is not guaranteed to be preserved; be sure to set it before every time + * you want to set a slot over the max stack size. + * <li>Stacks larger than the default max size for this type of inventory may not display + * correctly in the client. + * </ul> + * @param size The new maximum stack size for items in this inventory. + */ + public void setMaxStackSize(int size); + + /** * Return the name of the inventory * * @return The inventory name |