2

I made some custom tools with lore on my minecraft server, can I somehow make it so that people can't put any further enchantments on the items with books? Basically lock the enchantments somehow!

  • I don't believe that this is possible. Other then lore, is there anything special about these tools? Are they over enchanted or anything? Why are you trying to prevent players from adding enchantments? Perhaps there is some other solution that can meet your needs. – IronAnvil Apr 2 '18 at 17:39
  • There is lore and then I use command blocks to add a variety to effects. I guess I will just go with using max enchantments on them already and then use lower bases like leather boots to have them balanced between the normal diamond gear. – SimpleBenji01 Apr 2 '18 at 17:56
  • So you have lore only and this is how you are targeting this item for the special effects? You could make a system that detects if this item also has enchantments. If so you can replace the item with nothing, replace the item with the unenchanted version, kill the player, etc. – IronAnvil Apr 2 '18 at 20:49
2

You can, in at least some capacity, achieve this.

Assuming that your player cannot gain access to another tool identical to that one (but no enchants), then all you need to do is wear down the tool multiple times, repairing it each time in an anvil. Each time you repair it in the anvil, it will cost more and more xp until eventually the item becomes "Too Expensive!". Then, unless they go into creative, they will not be able to add any more enchants to the tool, however:

  • They will not be able to repair it in the anvil anymore
  • They CAN still rename it
  • If they repair it using a crafting inventory (by placing 2 of the same tool in it) this will reset the "Too Expensive!" limit (but will remove all enchants.
| improve this answer | |
  • I just tinkered with it a bit. I found a way to raise the enchant weight myself, I just combine like 20 mending books, merge them with an anvil and then put one of them on the item. Then I remove the enchant with an nbt editor. The weight stays and it now says "too expensive" for all enchants. – SimpleBenji01 Apr 2 '18 at 18:11
  • That is of course an alternative way - however I believe that my downfalls mentioned would be the same. In addition - if the player enters creative mode the enchant cap is increased drastically, so you may need to keep going in creative if the player in question ever enters it. – Crafter0800 Apr 2 '18 at 18:13
  • actually - the items already have the unbreakable tag as well because they are kind of "legendary items". so yeah, I think this should work out. thanks for the help still! – SimpleBenji01 Apr 2 '18 at 18:31
  • You can also remove the enchantments with commands or, even easier, don't do the whole anvil thing, but instead increase the RepairCost tag with a command. – Fabian Röling Apr 2 '18 at 18:37
  • 1
    @SimpleBenji01 A repair cost over 40 makes the item too expensive. Here is an example of what Fabian was talking about: /give @p minecraft:diamond_sword 1 0 {RepairCost:41} – IronAnvil Apr 2 '18 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.