Started by
Kooral00
on
Topic category: Help with Minecraft modding (Java Edition)
How to make the sword able to be used from a given experience level (let's say lvl 5), if someone doesn't have the required level it doesn't deal damage to anything
You could run a procedure that replaces the sword with a harmless variant in the player's main hand, if their experience falls below a certain level, making sure to retain the enchantments, custom name, etc. Then doing the reverse if they're holding the weakened version of the sword.
...This can be kind of complicated though, so if you want a simpler method, you could just apply like 1 second of high level weakness whenever the player is holding the sword.