Start the implementation of a custom wrapper for enchantment.

This will aim to allow to implement support for custom implementation of enchantment
This commit is contained in:
alexcrea 2024-06-16 02:16:38 +02:00
parent d13085f4e1
commit f261e3c795
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
3 changed files with 173 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import org.bukkit.plugin.java.JavaPlugin
import xyz.alexcrea.cuanvil.command.EditConfigExecutor
import xyz.alexcrea.cuanvil.command.ReloadExecutor
import xyz.alexcrea.cuanvil.config.ConfigHolder
import xyz.alexcrea.cuanvil.enchant.WrappedEnchantment
import xyz.alexcrea.cuanvil.gui.config.MainConfigGui
import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant
import xyz.alexcrea.cuanvil.listener.ChatEventListener
@ -93,6 +94,9 @@ class CustomAnvil : JavaPlugin() {
logger.warning("Please note CustomAnvil is a more recent version of UnsafeEnchantsPlus")
}
// Register enchantments
WrappedEnchantment.registerEnchantments();
// Load ProtocolLib dependency if exist
packetManager = if(pluginManager.isPluginEnabled("ProtocolLib"))
{ ProtocoLibWrapper(); }