Made PlanSponge use PluginLogger on enable

This commit is contained in:
Rsl1122 2018-11-11 21:19:15 +02:00
parent bfd0cb4957
commit d9cc79814f

View File

@ -87,19 +87,19 @@ public class PlanSponge extends SpongePlugin implements PlanPlugin {
system.getDatabaseSystem().getDatabase() system.getDatabaseSystem().getDatabase()
).registerMetrics(); ).registerMetrics();
slf4jLogger.info(locale.getString(PluginLang.ENABLED)); logger.info(locale.getString(PluginLang.ENABLED));
} catch (AbstractMethodError e) { } catch (AbstractMethodError e) {
slf4jLogger.error("Plugin ran into AbstractMethodError - Server restart is required. Likely cause is updating the jar without a restart."); logger.error("Plugin ran into AbstractMethodError - Server restart is required. Likely cause is updating the jar without a restart.");
} catch (EnableException e) { } catch (EnableException e) {
slf4jLogger.error("----------------------------------------"); logger.error("----------------------------------------");
slf4jLogger.error("Error: " + e.getMessage()); logger.error("Error: " + e.getMessage());
slf4jLogger.error("----------------------------------------"); logger.error("----------------------------------------");
slf4jLogger.error("Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload"); logger.error("Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload");
onDisable(); onDisable();
} catch (Exception e) { } catch (Exception e) {
errorHandler.log(L.CRITICAL, this.getClass(), e); errorHandler.log(L.CRITICAL, this.getClass(), e);
slf4jLogger.error("Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload"); logger.error("Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload");
slf4jLogger.error("This error should be reported at https://github.com/Rsl1122/Plan-PlayerAnalytics/issues"); logger.error("This error should be reported at https://github.com/Rsl1122/Plan-PlayerAnalytics/issues");
onDisable(); onDisable();
} }
PlanCommand command = component.planCommand(); PlanCommand command = component.planCommand();