#how do i ban a specific enchantment on a specific item?

23 messages · Page 1 of 1 (latest)

silver sluice
#

i want to ban sharpness from blunt weapons without breaking anything else

gilded forgeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

flint ledge
#

You would have to download the add -on MoreJS and use the MoreJSEvents.filterAvailableEnchantments remove event on the items you don’t want to be able to have sharpness.

#

Although if you have the blunt items in loot tables they could still show up in chests with sharpness

silver sluice
#

would it be possible to use tags for filtering criteria?

flint ledge
#

I don’t think so. The method on the wiki is getItem() so you’d have to run the items individually through a loop

silver sluice
#

could you send the link to the wiki page?

flint ledge
silver sluice
#

thanks will try how it works

silver sluice
#

i tried to understand how it works based on the wiki but i dont know how to do it for an item

#

@modern oar could you help me?

modern oar
#

should be something like this ```js

MoreJSEvents.filterAvailableEnchantments((event) => {
if (event.item.id != 'minecraft:diamond_sword') return

// Remove the given enchantment only for diamond swords
event.remove("minecraft:unbreaking");

});```

modern oar
silver sluice
#

will this work with /reload or not?

silver sluice
modern oar
#

yes this should work with /reload i believe

#

try just going off the item id

silver sluice
#

sharp 5 and sharp 1 still work in an anvil so its not a matter of lvl

modern oar
#

show script

silver sluice
#
MoreJSEvents.filterAvailableEnchantments((event) => {
    if (event.item.id != 'minecraft:diamond_sword') return

    // Remove the given enchantment only for diamond swords
    event.remove("minecraft:sharpness");
})
silver sluice
#

alright the issue resolved itself as i no longer need to remove that enchant