Command which returns the amount of an item in an players inventory or in a slot of a player inventory which can be stored in a scoreboard objective, for example:
/itemcount @p slot.weapon.mainhand 0 snowball (objective) Which would store the amount in the scoreboard
or
/itemcount @a snowball
which would return the number of snowballs in each players inventory like:
player 1: 6 snowballs Etc.
Please sign in to leave a comment.
2 Comments