mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Merge pull request #1781 from flo0s/master
add /jobs reload compatibility to pyrofishing
This commit is contained in:
commit
b537ec4f36
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user