EnchantmentAPI
Overview
EnchantmentAPI brings customization to enchantments. Change how common enchantments are, turn specific ones off, change the max levels, or create your own!
Requirements
Features
- Customize Vanilla enchantments
- Allow enchantments to be naturally obtained on normally unenchantable items (like steaks!)
- Use SkillAPI's skill editor to create your own enchantments
- Code your own custom skills using a simple API
- Allow enchantments to be merged above their normal max levels
- Reach enchantment levels not normally possible (custom enchantment level 5403? sure!)
- Control how many enchantments can be obtained on a single item
- View fancy graphs of enchantment probabilities in game!
- Start off with 50 custom enchantments by getting EnchantmentPack
More Details
For more information, view the wiki on GitHub
Support
I am not active on this site. For support, head over to the Spigot page.
Older Versions
Unforunately, to keep this project maintainable, versions of Bukkit/Spigot before 1.12 will not be supported. To use this plugin on those versions, use builds released before the recoded release.
@Minnymin3
I'm not quite sure what you mean by this but when creating the enchantment, the getEnchantmentLevel method that you implement creates the randomness of being placed on an item. Returning a value less than one makes the enchantment not be added so something like this:
Going through some values, enchants for 1-5 levels will never give this enchantment because it always returns a value less than 1. The Math.random() allows for random chances at higher levels than that.
Is that what you were talking about?
EDIT: If you were asking how I did it, I posted a link to the source in the repository section if you want to take a look.
Sounds cool! Might check it out! Did you get the 'adding enchantments with enchanting table' with the enchant event and randomization?
Just waiting on the file to be approved. Glad people are looking forward to it. If you'd like to see anything added to it, just let me know. I use it as well so extra ideas would be great and much appreciated :)
I was thinking of making something like this but a bit more advanced although now that you've uploaded something like this, I guess I'll just stop the project =) This is good anyway as mine doesn't use Strings for the enchantable items but uses Materials/ItemStacks.
Really anticipating this, our server could use something like this. Hope it releases soon!
The idea looks fantastic! I cannot wait until this API is released!