Skip to content

Enchantments+, a Bukkit Custom Enchantments Plugin based on Zenchantments targetted at production grade servers

License

Notifications You must be signed in to change notification settings

gaikwadsid/EnchantmentsPlus

 
 

Repository files navigation

IMPORTANT: As of 3.0.0 the project requires Java 11 or above to run, use the 2.x.x LTS versions instead if you use Java 8

Got a question? Need help or want to discuss changes? Then feel free to contact me either via Email, Spigotmc conversations or Github Issues and Discussions. Issues however should be reported here on Github so forkers can profit from them being public, but it's the best if at least someone (me in most cases) knows exploits or bugs so they can be fixed, so in the end it doesn't really matter where they are reported to.

Enchantments+

Description

Enchantments+ is a hard fork of Zenchantments, a custom enchantments plugin adding 73 enchantments of all variants, including target-tracing arrows, lumber axes, block-breaking lasers, and much more. They are obtained through the normal enchantment process and act like regular enchantments, capable of being combined and merged (on paper-based server software). The plugin requires no client-side mods or resource packs. A comprehensive configuration file enables fine-tuning of individual enchantments to tailor them to every server's gameplay. The hard fork status however means that we won't maintain any parity with Zenchantments; this is because there are too many differences with the plugin that it is pretty much impossible to convert the 174 commits from Zenchantment's development branch into EnchantmentsPlus-compatible commits.

Enchantments+ vs other Zenchantments forks

  • This fork is actively maintained and has persisted since May of 2020, which is the longer than any other fork who are otherwise more shortlived.
  • This is fast(-ish). During the last months the fork accumulated lots of revisions that aim at improving performance as well as general code quality. It also continues to do so with each update.
  • Enchantments+ doesn't use NMS. This means that newer minecraft versions are supported at a bigger scale than otherwise is the case, however with Zenchantments remvoing it's multi-version support, this may no longer be full selling point.
  • The fork is stable, while there are some bugs, most are either really obscure or noone reported them to me. If they are reported, they will often be fixed in under a day (especially on github).
  • EnchantmentsPlus 3+.x.x requires Java 11 (or higher) in order to compile and run, Zenchantments runs on Java 8, so if you have an older JVM, use Zenchantments instead
  • EnchantmentsPlus 4+.x.x (currently only planned) will make use of the Paper api for even more performance

Metrics

As of version 2.1.6 the plugin uses bstats to cover metrics, the page where the information is shown can be found here. Please do not opt out of Metrics as it will only come back to bite you! Changes that are introduced to the plugin may be based on the metrics.

Permissions

enchplus.enchant.get - On player enchant event, allow player to have a chance at the enabled custom enchantments
enchplus.enchant.use - Allow player to use the given custom enchants on an item
enchplus.command.reload - Access to /ench reload, to reload the configuration (try not to use, may lead to memory leaks)
enchplus.command.give - Gives an enchanted item, while similar to enchant, it also gives the underlying material
enchplus.command.list - Lists all availiable enchantments
enchplus.command.info - Returns the info of an enchantments
enchplus.command.onoff - Abillity to turn on / turn off a certain enchantment
enchplus.command.enchant - Enchants a item without giving the underlying material. Also allows to enchant other people's stuff, so be cautious.
enchplus.command.lasercol - Enables the abillity to colo(u)r the laser of your item in hand. Purely cosmetic and a good way to get a few extra "donations".

Commands

/ench help: Prints the help menu
/ench version: prints the version of the plugin
/ench info: Prints the information of all the enchantments on your current tool
/ench info <enchantment>: Prints the information about a single enchantment
/ench list: Returns the list of the applicable enchantments for the tool in your hand
/ench give <player> <material> <enchantment>: Gives the player a given material with the given enchantment at level 1
/ench give <player> <material> <enchantment> <level>: Gives the player a given material with the given enchantment at the given level
/ench lasercol <col>: Chages the tone of the laser used by the laser enchantment, per tool.
/ench <enchantment>: Enchants your tool in the hand with the given enchantment at level 1.
/ench <enchantment> <level>: Enchants your tool in the hand with the given enchantment at the given level.
/ench <enchantment> <level> <modifier>: Like above, but the third parameter dictates for who the enchantment should be applied (accepts things such as @a)
/ench <enchantment> <level> <modifier> <doNotification>: Like above, but the fourth parameter handles whether or not chat messages should be send as a error/success message. (use True or false)
/ench <enchantment> <level> <modifier> <doNotification> <force>: Like above, but the fith parameter handles whether the enchantment should be forced onto the tool. (use True or false)

Obtaining

See Releases for downloads Or compile this project like every other project out there via maven and a JDK 11 or higher, a "mvn clean package" should suffice to build the plugin.

Compatibility

The current version of this plugin is compatible with Spigot version 1.15.2, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5. Any versions under 1.15.2, will not work without tinkering, versions above 1.16.5, may, although with a few issues. We however recommend Paper for full compatibillity. If you are using spigot, please consider enabling the 1xx-anvil-merger option in the patches.yml.

Contribute

Anyone is free to contribute to this repository via pull requests, issues or comments, however keep in mind that this repository uses 4 space indentation. If you feel like compliaining about performance while not being an annoying person, then please send me profiling reports NOT TIMINGS. I cannot do much with Timings and I require proper profiling reports to optimize the plugin, otherwise I'm guessing where the bottlenecks COULD be (and usually they are not where I search them).

Changes performed in this fork compared to NMS-less Zenchantments

To view the changes compared to Zenchantments (from the point where the split happened), add the Changelog of NMS-Less Zenchantments onto it The current EnchantmentsPlus API is however entirely incompatible with the new Zenchantments API in almost every way.

  • Major changes:
    • Pretty big rewrites within most classes (Enchantment specific classes are mostly spared)
    • Most values in the compatibillity adapter can be changed via magic configuration files now
    • The Spectral enchantment can now be levelled by default
    • Uses the 1.16.3 Spigot API
    • 2 more enchantment getters
  • Minor changes:
    • Fixed the Reveal enchantment, with it's own twist
    • Added an enchantment gatherer denylist - only works with NBT and advLore right now
    • The color of the laser can now be changed for purely costmetical reasons. Why? Don't ask
    • Help and tab completion now handle permissions
    • Mystery fish can now catch other water mobs such as cod, pufferfish and salmon and was buffed overall
    • Admins can now change which items are part of which tool
    • Added metrics system
  • Patches:
    • Fire enchantment no longer OOMs when attempting to smelt unsmeltable stuff
    • Added toggleable shred cooldown when the laser enchantment is used
    • Fixed potential bug with the vortex enchantment, the specifics are unknown
    • Mitigated severe lag issues with the Spectral enchantment, also performed some optimisations. To get to the pervious way of how the enchantment worked, put the enchantment power to really high values
    • Spectral now can use it's own Protection system nullifying the risk of McMMO/Jobs exploits
    • Spectral performance increased noticeably
    • Lots of performance improvements for periodically running tasks
    • Dispensing laser items no longer temporarily freezes the Server
    • Grindstone works properly in a few more cases now
    • Spectral arrows can now be used!
  • Code changes (doesn't affect behaviour as much):
    • Refractored to it's own structure
    • Fix compilation issues with later bindings
    • Changed the way permissions are handled within the code
    • Removed ClassGraph as a dependency
    • Minimal usage of ItemStack#getItemMeta, which is a very expensive call. This should increase the performance by a noticable amount

About

Enchantments+, a Bukkit Custom Enchantments Plugin based on Zenchantments targetted at production grade servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%