Help making a additional snippet

  • 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 community!

    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!

Tewtiy551

Member
Dec 10, 2025
2
0
1
Making it so only maces with the tag "emace" are enchantable, but other ones without are repairable (with other maces), and can be renamed still.

on craft of mace:
if {emace.crafted} is not set:
set {emace.crafted} to true
set {_n} to nbt from "{custom_data:{emace:1b}}"
set slot 0 of current inventory to mace with nbt {_n}

- my current code so you are able to branch off of it. Thank you
 
Simple, just listen for enchant or enchant prepare events and check if the event-item contains the NBT. If it does, cancel the event.

To check, this should work...
if %nbt of event-item% contains "{custom_data:{emace:1b}}":

Also, please use CODE tags for your code it makes it easier to read...