Question Custom Enchantments

Ninjaguardian68

New member
May 28, 2024
2
0
1
I am making a paper plugin and I want to add custom enchantments. I'm a beginner so I don't know much and all tutorials seem outdated.
 
Version Output
This server is running Paper version git-Paper-496 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 7ac24a1 on ver/1.20.4)

Hinterhältiger

New member
Feb 25, 2022
2
0
1
Hesse, Germany
www.github.com
As far as I'm concerned, the Bukkit functions for registering new Enchantments have been completely removed, so you're on your own.
Visually, you can display enchantments using an item's lore and you can make a data pack which adds the recipes for the tools you want to enchant with an enchanting book with specific NBT data. But you gotta write the code for the enchantment "effects" yourself.

Feel free to get back to me if you need further help with that :)

PS: I would put the update checker in a separate class, otherwise the main class is bloated.
 

MrMcyeet

New member
May 28, 2024
1
0
1
You should probably wait until 1.21 releases to make a custom enchantment plugin. in a recent snapshot, Mojang announced that enchantments are changing in big ways, and I suspect that with this huge change, we'll probably see some form of an official API for handing new/custom enchantments.