mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 12:35:28 +01:00
Fixed NPE when MythicMobs plugin not found on plugin reload
This commit is contained in:
parent
8f067f4646
commit
5aa4f0b763
@ -769,7 +769,7 @@ public class Jobs extends JavaPlugin {
|
||||
if (HookManager.getMcMMOManager().CheckmcMMO()) {
|
||||
HookManager.setMcMMOlistener();
|
||||
}
|
||||
if (HookManager.getMythicManager().Check()) {
|
||||
if (HookManager.checkMythicMobs()) {
|
||||
HookManager.getMythicManager().registerListener();
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class HookManager {
|
||||
setWorldGuard();
|
||||
setMythicManager();
|
||||
|
||||
if (Jobs.getGCManager().MythicMobsEnabled && MythicManager != null && MythicManager.Check())
|
||||
if (checkMythicMobs())
|
||||
MythicManager.registerListener();
|
||||
}
|
||||
|
||||
@ -62,6 +62,10 @@ public class HookManager {
|
||||
return MythicManager;
|
||||
}
|
||||
|
||||
public static boolean checkMythicMobs() {
|
||||
return Jobs.getGCManager().MythicMobsEnabled && MythicManager != null && MythicManager.Check();
|
||||
}
|
||||
|
||||
private static boolean setWorldGuard() {
|
||||
if (pm.getPlugin("WorldGuard") != null && pm.isPluginEnabled("WorldGuard")) {
|
||||
worldGuardManager = new WorldGuardManager();
|
||||
|
Loading…
Reference in New Issue
Block a user