1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 12:05:16 +01:00

Merge pull request #1781 from flo0s/master

add /jobs reload compatibility to pyrofishing
This commit is contained in:
Zrips 2024-06-28 12:39:39 +03:00 committed by GitHub
commit b537ec4f36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -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();
}

View File

@ -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();

View File

@ -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);
}
}