mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Don't try to register listeners when mcMMO was disabled
This commit is contained in:
parent
ead1398132
commit
4ff6b5fbc7
@ -777,6 +777,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
} else {
|
||||
mcMMO.p.getLogger().warning("Errors were found in " + fileName + "! mcMMO was disabled!");
|
||||
mcMMO.p.getServer().getPluginManager().disablePlugin(mcMMO.p);
|
||||
mcMMO.p.noErrorsInConfigFiles = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,6 +203,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
} else {
|
||||
mcMMO.p.getLogger().warning("Errors were found in " + fileName + "! mcMMO was disabled!");
|
||||
mcMMO.p.getServer().getPluginManager().disablePlugin(mcMMO.p);
|
||||
mcMMO.p.noErrorsInConfigFiles = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,9 @@ public class mcMMO extends JavaPlugin {
|
||||
private static boolean spoutEnabled;
|
||||
private static boolean combatTagEnabled;
|
||||
|
||||
// Config Validation Check
|
||||
public boolean noErrorsInConfigFiles = true;
|
||||
|
||||
// XP Event Check
|
||||
private boolean xpEventEnabled;
|
||||
|
||||
@ -109,6 +112,10 @@ public class mcMMO extends JavaPlugin {
|
||||
setupSpout();
|
||||
loadConfigFiles();
|
||||
|
||||
if (!noErrorsInConfigFiles) {
|
||||
return;
|
||||
}
|
||||
|
||||
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
|
||||
|
||||
databaseManager = DatabaseManagerFactory.getDatabaseManager();
|
||||
@ -307,11 +314,6 @@ public class mcMMO extends JavaPlugin {
|
||||
repairables.addAll(rManager.getLoadedRepairables());
|
||||
repairableManager = RepairableManagerFactory.getRepairManager(repairables.size());
|
||||
repairableManager.registerRepairables(repairables);
|
||||
|
||||
// Check if Repair Anvil and Salvage Anvil have different itemID's
|
||||
if (Config.getInstance().getSalvageAnvilId() == Config.getInstance().getRepairAnvilId()) {
|
||||
getLogger().warning("Can't use the same itemID for Repair/Salvage Anvils!");
|
||||
}
|
||||
}
|
||||
|
||||
private void setupSpout() {
|
||||
|
Loading…
Reference in New Issue
Block a user