Commands let players perform actions and customize gameplay using text-based instructions. Use this topic to share feedback and ideas for improving commands and related tools.

3

/itemcount command

2 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    Useful! & You can do it with a lot of line commands with /execute store score <EntitySelector> <score> run data get entity <EntitySelector> Inventory

  • 0
    Registered User commented
    Comment actions Permalink

    This is already possible using /clear. When you set the maximum item count to 0, it returns the number of the specified items in a player's inventory.

    /clear @a snowball 0