Move these checks up.

These checks need to happen sooner because they may impact config
loading, specifically the MCPC+ check.

Fixes #1549
This commit is contained in:
GJ 2013-10-31 08:15:19 -04:00
parent d6c6c75157
commit 93d586592e

View File

@ -117,6 +117,12 @@ public class mcMMO extends JavaPlugin {
getLogger().setFilter(new LogFilter(this));
metadataValue = new FixedMetadataValue(this, true);
mcpcEnabled = getServer().getName().equals("MCPC+");
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null;
noCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("NoCheatPlus") != null;
compatNoCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("CompatNoCheatPlus") != null;
setupFilePaths();
loadConfigFiles();
@ -125,12 +131,6 @@ public class mcMMO extends JavaPlugin {
return;
}
mcpcEnabled = getServer().getName().equals("MCPC+");
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null;
noCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("NoCheatPlus") != null;
compatNoCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("CompatNoCheatPlus") != null;
if (mcpcEnabled) {
checkModConfigs();
}