ZEnchantmentCore icon

ZEnchantmentCore -----

Event-based API for creating custom enchantments.



ZEnchantmentCore v2.0.0-snapshot - MAJOR UPDATE
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
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