
Thees are all the arguments you need to write to create your self your own enchant:
'<Id>': This is the id of your enchant, you can use whatever you want, this is what you use to add the enchantment to your item.
Name: The name that will be displayed on the item.
Max-Lvl: The max level the enchantment, for now you can only go up to level 3999. If you put a number that is lower then 1, then the enchant will not accept a level (like Mending and Silk Touch).
Type:
The type of event that this enchantment will fire on. Thees are the current types:
Melee, Mining, Armor, Helmet, Chestplate, Leggings, Boots, General and Ranged.
Event:
The event that the enchantment will fire on. For now there are thees events only:
- Melee: PLAYER_HIT, ENTITY_HIT, PLAYER_KILL, ENTITY_KILL.
- Mining: BLOCK_BREAK, BLOCK_MINE
- Armor: AMBIENT, DAMAGE, PLAYER_HIT, ENTITY_HIT
- Helmet: AMBIENT, DAMAGE, PLAYER_HIT, ENTITY_HIT
- Chestplate: AMBIENT, DAMAGE, PLAYER_HIT, ENTITY_HIT
- Leggings: AMBIENT, DAMAGE, PLAYER_HIT, ENTITY_HIT
- Boots: AMBIENT, DAMAGE, PLAYER_HIT, ENTITY_HIT
- General: AMBIENT, SELECTED
- Ranged: PLAYER_HIT, ENTITY_HIT, BLOCK_HIT, AMBIENT
Commands: The list of commands that will run when the event fires. You can use thees placeholders in your commands to reference things:
$user$ - References the enchantment user's name
$lvl$ - References the current level of the enchantment
$player$ - References the player that the enchantment's event fired on (only PLAYER_KILL and PLAYER_HIT)
$entity$ - References the entity that the enchantment's event fired on (only ENTITY_KILL and ENTITY_HIT)
$x$ - References the block's X position (only BLOCK_BREAK, BLOCK_HIT and BLOCK_MINE)
$y$ - References the block's Y position (only BLOCK_BREAK, BLOCK_HIT and BLOCK_MINE)
$z$ - References the block's Z position (only BLOCK_BREAK, BLOCK_HIT and BLOCK_MINE)
$arrow$ - References the arrow that the enchantment's event fired on (only Ranged types)
For info about adding your enchantments to an item, please use:
/help codableenchants
Codable Enchantments

Description
This plugin lets you code your own enchantments using only it's config.yml file.
Minecraft Version: 1.12
API
Thees are all the things in the config that you need to know about:
Register-Until: In here, please write the highest id number out of all enchants. This section is only here because of a bug I'm dealing with, it will probably be removed soon.
Enchants: This is the list of your custom enchantments.
Basic
Wiki
To get an instance of the api use:
CodeEnchAPI api = new CodeEnchAPI();
Thees are some of the methods you can use: