Optimised Enchant Squared get and clean.

This commit is contained in:
alexcrea 2024-06-16 19:11:09 +02:00
parent c589a14b0b
commit 88c4f0509b
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
9 changed files with 65 additions and 23 deletions

View file

@ -8,15 +8,15 @@ import xyz.alexcrea.cuanvil.dependency.protocolib.ProtocoLibWrapper
object DependencyManager {
lateinit var packetManager: PacketManager
var enchantmentSquaredCompatibility: EnchantmentSquaredDependency? = null;
var enchantmentSquaredCompatibility: EnchantmentSquaredDependency? = null
fun loadDependency(){
val pluginManager = Bukkit.getPluginManager();
val pluginManager = Bukkit.getPluginManager()
// ProtocolLib dependency
packetManager =
if(pluginManager.isPluginEnabled("ProtocolLib")) ProtocoLibWrapper();
else NoProtocoLib();
if(pluginManager.isPluginEnabled("ProtocolLib")) ProtocoLibWrapper()
else NoProtocoLib()
// Enchantment Squared dependency
enchantmentSquaredCompatibility =