EnchantmentAPI

Lifesteal Enchantment

Overview

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!

Features

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)

Statistics

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 :)

Config

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.

Commands

  • /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

Permissions

  • 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

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

Source Code

Github

Tutorials

Troubleshooting

  • 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

Forum

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 mantoko mantoko Jan 30, 2015 at 08:40 UTC - 0 likes

    @mantoko: Go

    Meny people started asking me that's why here is the link: http://toolegit.eu/enchantmentapi.jar I dont guarantee anything, you are using it at your own risk !

  • Avatar of CadeCEB CadeCEB Jan 24, 2015 at 22:22 UTC - 0 likes

    @Eniripsa96: Go

    I *WILL* be donating if this is updated to 1.8 (at least 15$ depending on the quality) And i think there are others that wood as well!

    <<size 0px>>ZBDHae57eabca06a70f2414ba5208091358d<</size>

  • Avatar of Eniripsa96 Eniripsa96 Jan 20, 2015 at 17:17 UTC - 0 likes

    For those wondering: I've stopped working on this project for now due to project files getting screwed up and not letting me compile it. I'll probably pick up the project again at a later date and redo it, but that will be at a much later date as I'm focusing on school work and SkillAPI for now. Sorry for the inconvenience.

    BFAK:86513,955c39aa0fd005d53a0df93f256769ca83f60e42d36afbeaf01fab5fcc205630My Plugins: SkillAPI | Parties | MCCore | LegendaryWeapons | EnchantmentAPI | EnchantmentPack

  • Avatar of nashoxx nashoxx Jan 19, 2015 at 21:16 UTC - 0 likes

    I just love when developer abandon their plugins/projects without saying anything, it is just awesome!

  • Avatar of fdigl fdigl Jan 14, 2015 at 14:03 UTC - 0 likes

    @mip6886: Go

    No, this plugin doesn't do that.

  • Avatar of mip6886 mip6886 Jan 12, 2015 at 12:53 UTC - 0 likes

    Can this remove/transfer enchantments to other items? Example:Take an enchantment off a sword and put it on a book for later use.

  • Avatar of thomas779421 thomas779421 Jan 06, 2015 at 14:49 UTC - 0 likes

    @mantoko: Go

    Hey !Can you give me a download link ?Please i really need this :)

  • Avatar of CadeCEB CadeCEB Jan 05, 2015 at 18:26 UTC - 0 likes

    Update for 1.8? Maybe?

  • Avatar of mantoko mantoko Jan 04, 2015 at 11:39 UTC - 0 likes

    Hello, I removed the custom anvils from the code by myself if someone want's just jar he can write me ... bukkit or Eniripsa96 you are free to delete my comment :)

  • Avatar of shahiem99 shahiem99 Nov 15, 2014 at 18:33 UTC - 1 like

    How to remove the Custom Anvils?

Facts

Date created
May 31, 2013
Category
Last update
Jan 03, 2014
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
EnchantmentAPI
Downloads
26,334
Recent files

Authors