diff options
author | Celtic Minstrel <celtic.minstrel.ca@some.place> | 2012-03-14 00:02:20 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-15 22:33:15 -0400 |
commit | 4507bd922f908e269225e710fa395ce6f0d323a8 (patch) | |
tree | ea8c56774da3aad1ec96e3754e5be12fa4435cba /src | |
parent | 09eacb968d929d0057fbefae3de9b5fe15376ba1 (diff) | |
download | bukkit-4507bd922f908e269225e710fa395ce6f0d323a8.tar bukkit-4507bd922f908e269225e710fa395ce6f0d323a8.tar.gz bukkit-4507bd922f908e269225e710fa395ce6f0d323a8.tar.lz bukkit-4507bd922f908e269225e710fa395ce6f0d323a8.tar.xz bukkit-4507bd922f908e269225e710fa395ce6f0d323a8.zip |
[Bleeding] Add Inventory.{get,set}MaxStackSize(). Addresses BUKKIT-1076
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 |