#how to check the durability of an item in a player's inventory?

1 messages · Page 1 of 1 (latest)

fair crypt
#

how to check the durability of an item in a player's inventory? If the strength is different, the test doesn't happen.

fair crypt
#

plz help

rotund igloo
#

You want the requirment to pass if the item has a certain durability?

fair crypt
harsh aspen
#

@fair crypt the option is data:, try 0 or the maximum durability of the wooden sword, which is 59

fair crypt
harsh aspen
#

Right click requirement and left click command?

harsh aspen
#

Idk what to say about the clear command, sorry

tribal mauve
#

strict: boolean XD

tribal mauve
fair crypt
# tribal mauve use `clean` instead of `clear`

I'm having a problem checking.
minecraft:clear %player_name% stone_sword 1
clear %player_name% stone_sword 1
clean %player_name% stone_sword 1
minecraft:clear %player_name% stone_sword{Damage:59} 1

None of these commands will take an item if it has a durability of less than 59.

tribal mauve
#

@fair crypt

fair crypt
tribal mauve
fair crypt
#

no((

#

Yeah, I'll download it now.

tribal mauve
#

you just want to clear spectific item with full durability ?

fair crypt
tribal mauve
#
click_requirement:
  requirements:
    type: has item
    material: wooden_sword
    strict: true
click_commands:
  - '[placeholder] %checkitem_remove_mat:wooden_sword,amt:1,strict%'
fair crypt
#

could you tell me how to give a player an enchanted tool?