From d877b707d670bfe03992d8a5f60a1fe1398dd0da Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 17 Nov 2022 15:12:28 +0000 Subject: [PATCH] Improved lang.yml/config.yml warning messages --- .../main/java/com/willfp/eco/core/EcoPlugin.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java index 1fc37cdd..fa8c9161 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java +++ b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java @@ -701,10 +701,9 @@ public abstract class EcoPlugin extends JavaPlugin implements PluginLike { protected LangYml createLangYml() { try { return new LangYml(this); - } catch (final NullPointerException e) { - this.getLogger().severe("Failed to load lang.yml"); - this.getLogger().severe("Please make sure you have a lang.yml in the resources folder"); - this.getLogger().severe("in your plugin jar"); + } catch (NullPointerException e) { + this.getLogger().severe("Failed to load lang.yml!"); + this.getLogger().severe("For the developer of this plugin: make sure you have a lang.yml"); e.printStackTrace(); Bukkit.getPluginManager().disablePlugin(this); return null; @@ -721,10 +720,9 @@ public abstract class EcoPlugin extends JavaPlugin implements PluginLike { protected ConfigYml createConfigYml() { try { return new ConfigYml(this); - } catch (final NullPointerException e) { - this.getLogger().severe("Failed to load config.yml"); - this.getLogger().severe("Please make sure you have a config.yml in the resources folder"); - this.getLogger().severe("in your plugin jar"); + } catch (NullPointerException e) { + this.getLogger().severe("Failed to load config.yml!"); + this.getLogger().severe("For the developer of this plugin: make sure you have a config.yml"); e.printStackTrace(); Bukkit.getPluginManager().disablePlugin(this); return null;