mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 21:15:28 +02:00
Make mcMMO quieter by moving most log messages to debug only
This commit is contained in:
@@ -164,6 +164,9 @@ public class mcMMO extends JavaPlugin {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
try {
|
||||
//Filter out any debug messages (if debug/verbose logging is not enabled)
|
||||
getLogger().setFilter(new LogFilter(this));
|
||||
|
||||
setupFilePaths();
|
||||
generalConfig = new GeneralConfig(getDataFolder()); //Load before skillTools
|
||||
skillTools = new SkillTools(this); //Load after general config
|
||||
@@ -180,9 +183,6 @@ public class mcMMO extends JavaPlugin {
|
||||
//metadata service
|
||||
metadataService = new MetadataService(this);
|
||||
|
||||
//Filter out any debug messages (if debug/verbose logging is not enabled)
|
||||
getLogger().setFilter(new LogFilter(this));
|
||||
|
||||
MetadataConstants.MCMMO_METADATA_VALUE = new FixedMetadataValue(this, true);
|
||||
|
||||
PluginManager pluginManager = getServer().getPluginManager();
|
||||
@@ -191,7 +191,6 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
upgradeManager = new UpgradeManager();
|
||||
|
||||
|
||||
modManager = new ModManager();
|
||||
|
||||
//Init Material Maps
|
||||
@@ -256,7 +255,7 @@ public class mcMMO extends JavaPlugin {
|
||||
new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
|
||||
}
|
||||
|
||||
debug("Version " + getDescription().getVersion() + " is enabled!");
|
||||
LogUtils.debug(mcMMO.p.getLogger(), "Version " + getDescription().getVersion() + " is enabled!");
|
||||
|
||||
scheduleTasks();
|
||||
CommandRegistrationManager.registerCommands();
|
||||
@@ -391,13 +390,13 @@ public class mcMMO extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
debug("Canceling all tasks...");
|
||||
LogUtils.debug(mcMMO.p.getLogger(), "Canceling all tasks...");
|
||||
getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
||||
debug("Unregister all events...");
|
||||
LogUtils.debug(mcMMO.p.getLogger(), "Unregister all events...");
|
||||
HandlerList.unregisterAll(this); // Cancel event registrations
|
||||
|
||||
databaseManager.onDisable();
|
||||
debug("Was disabled."); // How informative!
|
||||
LogUtils.debug(mcMMO.p.getLogger(), "Was disabled."); // How informative!
|
||||
}
|
||||
|
||||
public static String getMainDirectory() {
|
||||
@@ -432,10 +431,6 @@ public class mcMMO extends JavaPlugin {
|
||||
xpEventEnabled = !xpEventEnabled;
|
||||
}
|
||||
|
||||
public void debug(String message) {
|
||||
getLogger().info("[Debug] " + message);
|
||||
}
|
||||
|
||||
public static FormulaManager getFormulaManager() {
|
||||
return formulaManager;
|
||||
}
|
||||
@@ -616,7 +611,7 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
if(CoreSkillsConfig.getInstance().isPrimarySkillEnabled(PrimarySkillType.ACROBATICS))
|
||||
{
|
||||
getLogger().info("Enabling Acrobatics Skills");
|
||||
LogUtils.debug(mcMMO.p.getLogger(), "Enabling Acrobatics Skills");
|
||||
|
||||
//TODO: Should do this differently
|
||||
Roll roll = new Roll();
|
||||
|
Reference in New Issue
Block a user