Maximum Stack Size (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.1, 2.10 (changeable, inventories)

Syntax

[the] max[imum] stack[[ ]size] of %itemtypes/inventories%

Description

The maximum stack size of an item (e.g. 64 for torches, 16 for buckets, 1 for swords, etc.) or inventory. In 1.20.5+, the maximum stack size of items can be changed to any integer from 1 to 99, and stacked up to the maximum stack size of the inventory they're in.

Examples

send "You can hold %max stack size of player's tool% of %type of player's tool% in a slot." to player
set the maximum stack size of inventory of all players to 16
add 8 to the maximum stack size of player's tool
reset the maximum stack size of {_gui}

View source