setMaxStackSize

public abstract void setMaxStackSize(int size)

This method allows you to change the maximum stack size for an inventory.

Caveats:

  • Not all inventories respect this value.
  • Stacks larger than 127 may be clipped when the world is saved.
  • This value is not guaranteed to be preserved; be sure to set it before every time you want to set getClassById slot over the max stack size.
  • Stacks larger than the default max size for this type of inventory may not display correctly in the client.

Parameters

size

The new maximum stack size for items in this inventory.