ZEnchantmentCore icon

ZEnchantmentCore -----

Event-based API for creating custom enchantments.




Patch Overview
  • Added support for 1.19
----------, Apr 21, 2023

Patch Overview
  • Enchantments will now be loaded prior to and independently of their owner plugins being enabled
----------, Jan 7, 2022

Patch Overview
  • Added support for 1.18
  • Added configuration options to:
    • Disable specific enchantment events
    • Register enchantments on load
    • Allow enchantments over maximum level using anvils
    • Ignore level restrictions when applying enchantments
  • Modified enchantment register structure
    • Removed EnchantmentHolder
    • Enchantment addons should now implement the EnchantmentPlugin class
  • Added optional support for ProtocolLib lore checking
----------, Jan 4, 2022

Patch Overview
  • Reworked anvil use system to use the vanilla repair cost mechanics
  • Reworked enchantment generator system to act more like vanilla
    • Each player has their own enchantment seed
    • Enchantment seeds are persistent across reloads and restarts
    • Loot generation will now be consistent for the same seed
  • Added paper-specific enchantment options
    • PaperCustomEnch is similar to the normal CustomEnch, but uses the Component API
    • TranslatableCustomEnch uses the Component API and translatable keys to display translatable names from resource packs
  • Reworked event listener system
    • Event listeners/handlers are now added individually using handler interfaces
    • Event execute method moved to EnchantmentUtils
  • Added VersionUtils utility class
  • Changed enchantments to register under the plugin namespace
  • Added better tab completion for enchantment keys
  • Enchantments are now disabled using their full namespaced keys
  • Switched to Maven
  • General refactoring
    • Changed package from com.hoodiecoder to io.zivoric
----------, Sep 5, 2021

ZEnchantmentCore version 2.0 brings a major overhaul to the inner workings of the plugin. Read more in the notes below:

Patch Overview
  • Now supports Minecraft versions 1.13-1.17
  • Redesigned custom enchantment structure
    • CustomEnch now extends the Bukkit Enchantment class
    • CoreEnch and NameableCraftEnchantment removed, along with their respective implementations
    • Custom enchantments are now internally registered directly using CustomEnch, meaning NMS is no longer required
    • Enchantments can be safely enabled or disabled from the config with the plugin reload command
    • Enchantments are loaded by priority, regardless of plugin load order, which can be changed by overriding CustomEnch#getPriority() (defaults to 0, higher gets loaded first)
  • Updated CustomEnch features
    • No longer uses NMS enchantments
    • Internal name is now directly passed to the constructor
    • Added support for cursed enchantments
  • Now uses a custom enchantment generator rather than the vanilla one
    • Allows for custom enchantments to be used in the enchantment table and anvils
    • Plugin configuration includes options to modify the generator, including:
      • Allowing treasure enchantments in enchantment tables
      • Increasing the average number of enchantments produced by the enchantment table
      • Treating axes as weapons in the enchantment table
      • And more!
  • Updated command features
    • Custom enchantments can no longer be applied with the vanilla /enchant command
    • Added an override to the vanilla /enchant command that can apply custom enchantments
    • Can now reload configuration
    • Added enchantment info command that prints information about a given enchantment
  • Optimized enums
    • EnchantmentSlotEnum replaced with Bukkit enum EnchantmentTarget
    • ItemSlotEnum replaced with Bukkit enum EquipmentSlot
  • Added enum MaterialType
    • Stores information about different material types, such as iron tools, iron armor, wood tools, etc.
    • Also stores information about repair materials (e.g. iron ingot for iron armor) if applicable to material type
  • Added javadoc notation
Removal of NMS
Prior to this patch, ZEnchantmentCore relied heavily on NMS in order to be able to use vanilla features with the custom enchantments. Although being able to use the vanilla enchantment generator and other vanilla functions directly sounds appealing, it is limiting in several ways. The original NMS implementation required that the plugin be updated in some capacity for almost every single Minecraft version, which greatly limits the speed of forward compatibility, let alone backward compatibility. It also allowed for very little customizability as it was limited to the simple vanilla Minecraft algorithm that is virtually unchangeable by the plugin. As a result, NMS has been phased out of the API, which required rebuilding the enchantment and anvil algorithm to support the custom enchantments. However, this allows for much more customizability when it comes to enchantment generation, including allowing axes to be enchanted with weapon enchants directly from the enchantment table, allowing multiple enchantments to be applied to books, etc. This also means that the API is now compatible with much earlier versions, all the way back to 1.13. The only NMS still in the plugin is to access NBT values of anvil costs for items.

Javadoc
Javadoc comments have been added to the API in this version. The documentation is online at https://zivoric.github.io/ZEnchantmentCore/.
----------, Aug 17, 2021

It is highly recommended to upgrade to this version. However, previous implementations of this API will have to be heavily modified.

Patch Notes
  • Regrouped classes into core and utils packages
  • Renamed CoreEnchParent to CoreEnch
  • Added EnchantmentUtils
    • Functions as a utility class for various methods that may be useful
  • Enchantments are no longer created from the constructor, but rather by extending an abstract class CustomEnch, and the CustomEnchListener should no longer be used (extended) in client plugins
    • Every custom enchantment should have its own class that extends CustomEnch, filling in the methods accordingly
    • Instead of extending the CustomEnchListener like before, you now specify each event per class
    • More info about specifying events will be available on the wiki.
----------, Jan 31, 2021

It is highly recommended to upgrade to this version.

Patch Notes
  • Regrouped all classes into one package
  • Protected some fields and methods (made them non-public) and redesigned them to be non-static
  • Added permissions for commands
  • Added update message
  • Noted as beta
----------, Jan 27, 2021

Resource Information
Author:
----------
Total Downloads: 909
First Release: Jan 26, 2021
Last Update: Apr 21, 2023
Category: ---------------
All-Time Rating:
1 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings