1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00
This commit is contained in:
Zrips 2024-05-08 16:19:21 +03:00
parent 054a162b7b
commit b2cd2c6e82
2 changed files with 32 additions and 31 deletions

View File

@ -26,8 +26,8 @@ public class HookManager {
private static WorldGuardManager worldGuardManager;
private static StackMobHandler stackMobHandler;
private static WildStackerHandler wildStackerHandler;
private static BlockTrackerManager blockTrackerManager;
private static PyroFishingProManager pyroFishingProManager;
private static BlockTrackerManager blockTrackerManager;
private static PyroFishingProManager pyroFishingProManager;
private static final Jobs PLUGIN = JavaPlugin.getPlugin(Jobs.class);
@ -36,13 +36,13 @@ public class HookManager {
public static void loadHooks() {
pm = PLUGIN.getServer().getPluginManager();
setMyPetManager();
setWorldGuard();
setMythicManager();
setStackMobHandler();
setWildStackerHandler();
setBlockTrackerManager();
setPyroFishingProManager();
setMyPetManager();
setWorldGuard();
setMythicManager();
setStackMobHandler();
setWildStackerHandler();
setBlockTrackerManager();
setPyroFishingProManager();
}
public static StackMobHandler getStackMobHandler() {
@ -88,24 +88,24 @@ public class HookManager {
return MythicManager;
}
public static PyroFishingProManager getPyroFishingProManager() {
if(pyroFishingProManager == null)
pyroFishingProManager = new PyroFishingProManager();
public static PyroFishingProManager getPyroFishingProManager() {
if (pyroFishingProManager == null)
pyroFishingProManager = new PyroFishingProManager();
return pyroFishingProManager;
}
return pyroFishingProManager;
}
public static boolean checkMythicMobs() {
return Jobs.getGCManager().MythicMobsEnabled && MythicManager != null && MythicManager.check();
}
public static BlockTrackerManager getBlockTrackerManager() {
if (blockTrackerManager == null) {
blockTrackerManager = new BlockTrackerManager();
}
public static BlockTrackerManager getBlockTrackerManager() {
if (blockTrackerManager == null) {
blockTrackerManager = new BlockTrackerManager();
}
return blockTrackerManager;
}
return blockTrackerManager;
}
private static boolean setWorldGuard() {
if (JobsHook.WorldGuard.isEnabled()) {
@ -160,14 +160,15 @@ public class HookManager {
}
}
private static void setBlockTrackerManager() {
if (JobsHook.BlockTracker.isEnabled()) {
blockTrackerManager = new BlockTrackerManager();
}
private static void setPyroFishingProManager() {
if (JobsHook.PyroFishingPro.isEnabled()) {
pyroFishingProManager = new PyroFishingProManager();
}
}
private static void setBlockTrackerManager() {
if (JobsHook.BlockTracker.isEnabled()) {
blockTrackerManager = new BlockTrackerManager();
}
}
private static void setPyroFishingProManager() {
if (JobsHook.PyroFishingPro.isEnabled()) {
pyroFishingProManager = new PyroFishingProManager();
}
}
}

View File

@ -11,7 +11,7 @@ public enum JobsHook {
WorldGuard,
MythicMobs,
mcMMO,
BlockTracker;
BlockTracker,
PyroFishingPro;
private Boolean enabled;