#Enchantment level limit

1 messages · Page 1 of 1 (latest)

thin stirrup
#
  if event-item is enchanted with protection 4:
    send "<red> You can't have protection 4"
    set event-item's enchantment level of protection to 3```

howcome it doesn't change the enchant level when I click it? it shows no errors and i have the latest version of skript
urban stone
thin stirrup
urban stone
thin stirrup
thin stirrup
gilded tusk
#

maybe cancel the inventory click?

#

maybe it is picking up the item before it is modified or something

thin stirrup
#

idk its weird

gilded tusk
#

wait you just want to disable prot 4?

thin stirrup
#

i want prot 4 items to turn into prot 3

gilded tusk
#

you could change max level of the enchantment with a datapack but I realized that wouldn't change existing items

#

does it work if you change something else about the item?

#

like change the item's name

thin stirrup
#

thanks for helpinmg

gilded tusk
#

I don't think you have to drop it

#

maybe define a var that is event-item, modify the var, then overwrite event-slot with the var

gilded tusk
#

it should

thin stirrup
summer bay
#

Do like enchant event-item with protection 3

#

It should replace it

#

If it doesnt maybe set event-item to event-item of protection 3 or smth

#

Also using on inventory close would benefit you more

#

Cuz player can just drop the item to someone and equip it using dispenser or whatever it was called and hopper

#

Or just right click the armor piece

#

Although the inventory close wont really cover the equipping with right click