diff --git a/src/main/java/com/gamingmesh/jobs/Jobs.java b/src/main/java/com/gamingmesh/jobs/Jobs.java index e22ce1ca..5aefd64f 100644 --- a/src/main/java/com/gamingmesh/jobs/Jobs.java +++ b/src/main/java/com/gamingmesh/jobs/Jobs.java @@ -842,6 +842,9 @@ public final class Jobs extends JavaPlugin { pm.registerEvents(new JobsChatEvent(getInstance()), getInstance()); + if(HookManager.checkPyroFishingPro()) { + HookManager.getPyroFishingProManager().registerListener(); + } if (HookManager.getMcMMOManager().CheckmcMMO()) { HookManager.setMcMMOlistener(); } diff --git a/src/main/java/com/gamingmesh/jobs/hooks/HookManager.java b/src/main/java/com/gamingmesh/jobs/hooks/HookManager.java index d0c6ef46..323e0376 100644 --- a/src/main/java/com/gamingmesh/jobs/hooks/HookManager.java +++ b/src/main/java/com/gamingmesh/jobs/hooks/HookManager.java @@ -102,6 +102,10 @@ public class HookManager { return Jobs.getGCManager().MythicMobsEnabled && MythicManager != null && MythicManager.check(); } + public static boolean checkPyroFishingPro() { + return pyroFishingProManager != null; + } + public static BlockTrackerManager getBlockTrackerManager() { if (blockTrackerManager == null) { blockTrackerManager = new BlockTrackerManager(); diff --git a/src/main/java/com/gamingmesh/jobs/hooks/pyroFishingPro/PyroFishingProManager.java b/src/main/java/com/gamingmesh/jobs/hooks/pyroFishingPro/PyroFishingProManager.java index b5b2a96f..300509df 100644 --- a/src/main/java/com/gamingmesh/jobs/hooks/pyroFishingPro/PyroFishingProManager.java +++ b/src/main/java/com/gamingmesh/jobs/hooks/pyroFishingPro/PyroFishingProManager.java @@ -7,7 +7,6 @@ import org.bukkit.event.Listener; import com.gamingmesh.jobs.Jobs; import me.arsmagica.API.PyroFishCatchEvent; -import net.Zrips.CMILib.Logs.CMIDebug; public class PyroFishingProManager implements Listener { private static String lastFish; @@ -16,7 +15,7 @@ public class PyroFishingProManager implements Listener { public PyroFishingProManager() { this.jobs = Jobs.getInstance(); - jobs.getServer().getPluginManager().registerEvents(this, jobs); + registerListener(); } @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) @@ -30,4 +29,8 @@ public class PyroFishingProManager implements Listener { return null; return lastFish; } + + public void registerListener() { + jobs.getServer().getPluginManager().registerEvents(this, jobs); + } } \ No newline at end of file