No anvil place

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

Gamingloud21

Member
Jun 21, 2025
1
0
1
I Wanna make a skript that makes it so you can't put the mace into an anvil and I don't know the code to do it

What I have rn
on anvil prepare:
if (event-item is named mace):
cancel event
send "&cYou cannot use the Mace in the anvil!" to player
And when I do it I get this error
 

Attachments

  • Screenshot 2025-06-21 005738.png
    Screenshot 2025-06-21 005738.png
    21.7 KB · Views: 36
You cannot cancel anvil prepare events, you must specify the item-stack, and you can just say mace, not named mace.

Code:
on anvil prepare:
    if the event-item stack is a mace:
        close the inventory of the player
        send "{close message}"

This will forcibly close the inventory if a mace is put in the anvil