Solved Need help blacklisting named items from getting duped in a shulker box.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

SubSplash

Member
Oct 11, 2023
22
1
3
Hello! I need help blacklisting named items from getting duped in a shulker box, for example:

Code:
command /dupe:
  trigger:
    if player's held item is any shulker box:
      set {_items} to tag "BlockEntityTag;Items" of nbt compound of player's held item
      if "%{_items}%" contains "enchanted_golden_apple" or "red_dye" named ""heart"":
        send "&cYou're not allowed to dupe this item!" to player
      else:
        give player's held item to player
    else:
      give player's held item to player

Error: Can't understand this condition: '"%{_items}%" contains "enchanted_golden_apple" or "red_dye" named ""heart""'
 
Hello! I need help blacklisting named items from getting duped in a shulker box, for example:

Code:
command /dupe:
  trigger:
    if player's held item is any shulker box:
      set {_items} to tag "BlockEntityTag;Items" of nbt compound of player's held item
      if "%{_items}%" contains "enchanted_golden_apple" or "red_dye" named ""heart"":
        send "&cYou're not allowed to dupe this item!" to player
      else:
        give player's held item to player
    else:
      give player's held item to player

Error: Can't understand this condition: '"%{_items}%" contains "enchanted_golden_apple" or "red_dye" named ""heart""'
Try making it into a list variable. It's very possible that the nbt component contains more than one value so that could be why that's not working.