Lifesteal Enchantment


The plugin is made primarily for developer usage as it doesn't do much on its own. It does however provide very easy access into creating custom enchantments that look like normal enchantments and can be added through both the enchanting table and programmatically! Now developers can make new enchantments such as life steal even with very little code!

Don't want to code your own enchantments? Visit EnchantmentPack for a large collection of enchantments!


Silly Enchantment
(a lv5190 enchantment)

  • An extendable class for plugins for simple setting up of enchantments
  • An abstract CustomEnchantment class for quick enchantment creation
  • Automatic effect activation when the enchanted item hits something
  • Automatic enchanting table integration
  • Enchantments are easily added onto any item
  • The max level of enchantments is that of an integer variable
  • Large enchantment levels should probably be avoided though (above is a good reason why)
  • Any item can use the enchantments (torches, signs, you name it)
  • Enchantment effects can be for attacking, defending, breaking blocks, equipping, unequipping, or mix of them all!
  • Any enchantment can be completely disabled by editing the config
  • Configurable weights, max levels, conflict groups, and item sets for all enchantments
  • All items can be used in enchanting tables if they have an enchantment bound to them as of v3.0!
  • Anvils can now handle custom enchantments very similar to any vanilla enchantment (v4.0)
  • Randomly generated names can be applied to enchanted items! (You can turn this off)
  • Permissions per enchantment (with v4.10)


New Enchantment Table Mechanics

For an in-depth explanation on the new mechanics for the enchantment table (because it needed some to get every item to work), go here
Thanks to Diemex for coming up with this idea :)


A config file is generated as new enchantments are added. Adding more enchantments later will simply automatically add onto the config with its default values the next time you reload your server. All changes you make will override the enchantment values. You can edit them while the server is running and reloading the server will apply them.

The config allows you to change the following things:

  • weight: chance of getting the enchantment from a table
  • items: the items that can receive the enchantment from a table
  • enabled: whether or not the enchantment can be obtained and used
  • table: whether or not the enchantment can be obtained in the enchantment table
  • group: the conflict group of the enchant - items in the same group will conflict unless its the default group
  • max: the maximum level for the enchantment
  • base: the minimum modified enchantment level that can get the enchantment
  • interval: the amount of modified enchantment levels above the base it takes to get the next tier

    Vanilla enchantments cannot be completely disabled, although you can stop them from being received in the enchantment table.

    Disabled custom enchantments will no longer work on items that had received it before disabling it.


  • /enchantapi list [page] - Providing the page gives a detailed list while no page just shows you the complete list
  • /enchantapi reload - Reloads the plugin data
  • /enchantapi book - gives you a book with descriptions for every enchantment
  • /enchantapi add <enchantName> [enchantLevel] - Supports vanilla names such as "sharpness" as of v4.0!
  • /enchantapi stats <item> <level> - Displays probabilities for every possible enchantment for the item at the given level (item name or item ID)
  • /enchantapi graph <item> <enchant> - Displays a graph for probabilities of the enchantment on the item over all 30 levels (item name or item ID)
    Yes, you do have to include spaces for the addenchant command with the enchantment name!
    Note: the graph takes 3-5 seconds to generate because it generates 3,000,000 samples in order to get reliable results!

    graph command


  • EnchantmentAPI.list - access to the list command
  • EnchantmentAPI.book - access to giving yourself a description book
  • EnchantmentAPI.admin - access to adding enchants to items, reloading the plugin, and viewing statistics
  • EnchantmentAPI.table - access to custom enchantments from the table
  • EnchantmentAPI.names - access to random names from enchanting (needs table as well)

    Version 4.10 permissions
  • EnchantmentAPI.enchant - access to all enchantments in the table (default is true)
  • EnchantmentAPI.enchant.enchantName - access to the enchantment in the table (replace 'enchantName' with the name of the enchantment with all lowercase letters and no spaces)

    Version 4.11 permissions
  • EnchantmentAPI.enchant.vanilla - access to all vanilla enchantments (default is true)
    Note, with this permission added, removing the permission EnchantmentAPI.enchant will still leave players with access to vanilla enchantments. You must remove both for them not to have the access!

Javadocs, Source Code, and Tutorials


Javadocs are found here
Thanks to JefferiesTube for the space for the javadocs!

Source Code




  • Losing items in the enchanting table? Try deleting your config files as they are probably outdated
  • If the you start getting loading problems that point to EnchantPlugin saying that the class cannot be loaded, try adding this line to your plugin.yml:
depend: [EnchantmentAPI]

Example Enchantments


I have created a forum for this that you can submit ideas, projects you are working on, and bugs to. Its completely optional but it might help organize what's going on with this project :)

Special Thanks

  • zag09 for finding several bugs and making suggestions
  • JefferiesTube for the Javadocs space and the bountiful suggestions
  • Diemex for cleaning up my sloppy code

Like the project?

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of MayorOfBukkit MayorOfBukkit Sep 03, 2016 at 01:56 UTC - 0 likes

    Beautiful API. I just love it.

    Need a server?


    Cheap 480 Gbps DDoS protected servers at $2.5 / GB

    Intel Xeon Processors

  • Avatar of mikeyjohn03 mikeyjohn03 Aug 25, 2016 at 04:10 UTC - 0 likes

    How do I rename items with the anvil?

  • Avatar of andris15 andris15 Aug 09, 2016 at 10:22 UTC - 0 likes
    [12:14:15] [Server thread/ERROR]: Could not pass event PrepareItemEnchantEvent to EnchantmentAPI v4.28
    	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.10.2.jar:git-Paper-830]
    	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.10.2.jar:git-Paper-830]
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.10.2.jar:git-Paper-830]
    	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.10.2.jar:git-Paper-830]
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.ContainerEnchantTable.a(ContainerEnchantTable.java:172) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.ContainerEnchantTable$1.update(ContainerEnchantTable.java:29) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.InventorySubcontainer.setItem(InventorySubcontainer.java:150) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.Slot.set(Slot.java:58) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.ContainerEnchantTable.b(ContainerEnchantTable.java:350) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.Container.a(Container.java:262) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1910) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:33) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:10) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched_1.10.2.jar:git-Paper-830]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_101]
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_101]
    	at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:791) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:404) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:725) [patched_1.10.2.jar:git-Paper-830]
    	at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:624) [patched_1.10.2.jar:git-Paper-830]
    	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
    Caused by: java.lang.NullPointerException
    	at com.rit.sucy.enchanting.EListener.onPrepareEnchant(EListener.java:403) ~[?:?]
    	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor64.execute(Unknown Source) ~[?:?]
    	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.10.2.jar:git-Paper-830]
    	... 22 more
    Last edited Aug 09, 2016 by andris15
  • Avatar of SirGregg SirGregg Jul 17, 2016 at 03:18 UTC - 0 likes

    @DrewGDC: Go

    There are tutorial pages under the "Tutorials" section. Also, there the author put the javadocs under "Javadocs".

    If anyone is having an error, make sure to add depend: [EnchantmentAPI] to your plugin.yml!


  • Avatar of DrewGDC DrewGDC Jun 23, 2016 at 17:59 UTC - 0 likes

    can you make enchantment maker for people who dont know about coding?

  • Avatar of tacomachine45 tacomachine45 Jun 19, 2016 at 22:40 UTC - 0 likes

    I am receiving what I believe to be as an error with the anvil. I have the custom anvil disabled in the config. Whenever I try to add a diamond sword with 6 enchantments to the anvil, it says: "This item is being repulsed by the anvil." It then proceeds to kick the diamond sword out of the anvil and back into my hand or inventory. It does this with any item that has 5-6 enchantments. Feedback is appreciated.

  • Avatar of vanthoi vanthoi Jun 19, 2016 at 21:34 UTC - 0 likes

    Please fix bug anvil
    For 2 diamond_swords on anvil. then press 8 to retrieve.
    We will clone infinite. So how to fix it!
    Items such as axes, outages, ...
    MC 1.10

  • Avatar of lorinthios lorinthios Jun 11, 2016 at 05:07 UTC - 0 likes

    Additionally, setting an enchant to isTableEnabled = false, doesn't seem to work. Still getting those enchants through the enchant table... searching for code location to fix...

    Seems like the main issue, is the api not catching changes with isTableEnabled after the enchant has been updated.

    Last edited Jun 11, 2016 by lorinthios

    Forge of Worlds

    A Custom RPG Sandbox experience

  • Avatar of lorinthios lorinthios Jun 09, 2016 at 01:55 UTC - 0 likes

    To the developers, I found a fix for the current issue with applyEquipEffect and applyUnequipEffect.


    In EEquip:67, that try/catch needs to be moved inside the for loop. It will work flawless then, cloned the repo locally and tested. Works like a charm

  • Avatar of bsdp123 bsdp123 May 21, 2016 at 09:34 UTC - 0 likes

    So I tried to post a comment here a while ago but I do not see it on here now. In v4.28 (For 1.9) the applyEquipEffect and applyUnequipEffect triggers do not work - they are never called. I have tested this with enchantments from the enchantmentPack and with my own code and with both, no trigger is ever called.

    Also, it seems that for some reason some of my enchantments throw exceptions when trying to use the graph or get them through enchanting tables.

    Honestly I really want this API to work but at the moment it is not usable because of these bugs, the enchantment tables not giving or applying enchantments is incredibly annoying. I will not change one of the enchantments, but adding a new enchantment will make old ones that have not been edited unobtainable.


Date created
May 31, 2013
Last update
Mar 24, 2016
Development stage
  • enUS
MIT License
Curse link
Reverse relationships
Recent files