Sign in
Skip to main content

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.

15

New "hasitem = {noi = (name of item)" Command For Named Items

2 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    You can check for a specific item by adding an nbt-constraint to the selector:

    effect give @a[nbt={Inventory:[{Slot:100b, id:"minecraft:leather_boots", Count:1b, tag:{display:{Name:'{"text":"Grass Boots"}', color:<COLOR>}}}]}] 1 0 true

    After the tag: you just copy the NBT-data of your boots.

  • 0
    Registered User commented
    Comment actions Permalink

    When putting this command in on Bedrock Edition, it just says gives an Error rather than doing anything

    effect give @a[nbt={Inventory:[{Slot:100b, id:"minecraft:leather_boots", Count:1b, tag:{display:{Name:'{"text":"Grass Boots"}', color:<COLOR>}}}]}] 1 0 true

    Which means that this command doesn't work for Bedrock Edition, there is no NBT thing on bedrock or anything like these parameters.

    So I agree that the [hasitem = {noi = {name}}] thing would be useful as this would help bedrock players a lot.