diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java b/Plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java index c500c13d..f03beb84 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java @@ -22,11 +22,6 @@ public class EcoEnchantsPlugin extends JavaPlugin { */ private final ExtensionLoader loader = new EcoExtensionLoader(); - /** - * ProtocolLib - */ - private final ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager(); - /** * NMS version */ @@ -61,14 +56,6 @@ public class EcoEnchantsPlugin extends JavaPlugin { return loader; } - /** - * Get ProtocolLib protocol manager - * @return The {@link ProtocolManager} that EcoEnchants interacts with - */ - public ProtocolManager getProtocolManager() { - return protocolManager; - } - /** * Get plugin instance * @return Plugin instance diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/display/AbstractPacketAdapter.java b/Plugin/src/main/java/com/willfp/ecoenchants/display/AbstractPacketAdapter.java index 566f7593..116ee987 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/display/AbstractPacketAdapter.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/display/AbstractPacketAdapter.java @@ -1,6 +1,7 @@ package com.willfp.ecoenchants.display; import com.comphenix.protocol.PacketType; +import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.events.ListenerPriority; import com.comphenix.protocol.events.PacketAdapter; import com.comphenix.protocol.events.PacketContainer; @@ -49,8 +50,8 @@ public abstract class AbstractPacketAdapter extends PacketAdapter { } public final void register() { - if(!EcoEnchantsPlugin.getInstance().getProtocolManager().getPacketListeners().contains(this)) { - EcoEnchantsPlugin.getInstance().getProtocolManager().addPacketListener(this); + if(!ProtocolLibrary.getProtocolManager().getPacketListeners().contains(this)) { + ProtocolLibrary.getProtocolManager().addPacketListener(this); } } }