From eeccd5c30feb6a364af91e39202e5face3a4091b Mon Sep 17 00:00:00 2001 From: jonagamerpro1234 Date: Sun, 20 Feb 2022 00:01:46 -0300 Subject: [PATCH] v1.7.4-pre.16 bugfix --- CustomJoinAndQuitMessages/pom.xml | 4 +-- .../CustomJoinAndQuitMessages.java | 14 ++++---- .../customjoinandquitmessages/Metrics.java | 3 +- .../utils/Logger.java | 33 ------------------- 4 files changed, 10 insertions(+), 44 deletions(-) diff --git a/CustomJoinAndQuitMessages/pom.xml b/CustomJoinAndQuitMessages/pom.xml index b389317..3f16b62 100644 --- a/CustomJoinAndQuitMessages/pom.xml +++ b/CustomJoinAndQuitMessages/pom.xml @@ -4,7 +4,7 @@ 4.0.0 jss.customjoinandquitmessages CustomJoinAndQuitMessages - 1.7.4-Pre.15 + 1.7.4-Pre.16 CustomJoinAndQuitMessages https://github.com/jonagamerpro1234/CustomJoinAndQuitMessages @@ -62,7 +62,7 @@ org.spigotmc spigot-api - 1.18-R0.1-SNAPSHOT + 1.18.1-R0.1-SNAPSHOT provided diff --git a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/CustomJoinAndQuitMessages.java b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/CustomJoinAndQuitMessages.java index 6b4194a..5deface 100644 --- a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/CustomJoinAndQuitMessages.java +++ b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/CustomJoinAndQuitMessages.java @@ -19,7 +19,6 @@ import jss.customjoinandquitmessages.manager.InventoryView; import jss.customjoinandquitmessages.utils.EventUtils; import jss.customjoinandquitmessages.utils.Logger; -import jss.customjoinandquitmessages.utils.Logger.Level; import jss.customjoinandquitmessages.utils.Settings; import jss.customjoinandquitmessages.utils.UpdateChecker; import jss.customjoinandquitmessages.utils.UpdateSettings; @@ -38,7 +37,6 @@ public class CustomJoinAndQuitMessages extends JavaPlugin{ private Map availableLangs = new HashMap<>(); private EventUtils EventsUtils = new EventUtils(this); private ConfigFile configFile = new ConfigFile(this, "config.yml"); - private Logger logger = new Logger(); private HookManager hooksManager = new HookManager(this); private PreConfigLoader preConfigLoader = new PreConfigLoader(this); private String updateVersion; @@ -107,12 +105,12 @@ public void onEnable() { if(this.getDescription().getVersion().equalsIgnoreCase(version)) { Logger.success("&a" + this.name + " is up to date!"); }else { - logger.Log(Level.OUTLINE, "&5<||" + Utils.setLine("&5")); - logger.Log(Level.WARNING, "&5<||" + "&b" + this.name + " is outdated!"); - logger.Log(Level.WARNING, "&5<||" + "&bNewest version: &a" + version); - logger.Log(Level.WARNING, "&5<||" + "&bYour version: &d" + UpdateSettings.VERSION); - logger.Log(Level.WARNING, "&5<||" + "&bUpdate Here on Spigot: &e" + UpdateSettings.URL_PlUGIN[0]); - logger.Log(Level.OUTLINE, "&5<||" + Utils.setLine("&5")); + Logger.outLine("&5<||" + Utils.setLine("&5")); + Logger.warning("&5<||&b" + this.name + " is outdated!"); + Logger.warning("&5<||&bNewest version: &a" + version); + Logger.warning("&5<||&bYour version: &d" + UpdateSettings.VERSION); + Logger.warning("&5<||&bUpdate Here on Spigot: &e" + UpdateSettings.URL_PlUGIN[0]); + Logger.outLine("&5<||" + Utils.setLine("&5")); } }); } diff --git a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/Metrics.java b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/Metrics.java index 5020abe..46f6adf 100644 --- a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/Metrics.java +++ b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/Metrics.java @@ -81,7 +81,8 @@ public class Metrics { * @param pluginId The id of the plugin. * It can be found at What is my plugin id? */ - public Metrics(Plugin plugin) { + @SuppressWarnings("deprecation") + public Metrics(Plugin plugin) { if (plugin == null) { throw new IllegalArgumentException("Plugin cannot be null!"); } diff --git a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/utils/Logger.java b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/utils/Logger.java index 0552424..125752c 100644 --- a/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/utils/Logger.java +++ b/CustomJoinAndQuitMessages/src/main/java/jss/customjoinandquitmessages/utils/Logger.java @@ -2,35 +2,6 @@ public class Logger { - public void Log(Level level, String msg) { - if (msg == null) { - return; - } - switch (level) { - case ERROR: - error(msg); - break; - case WARNING: - warning(msg); - break; - case INFO: - info(msg); - break; - case OUTLINE: - outLine(msg); - break; - case SUCCESS: - success(msg); - break; - case DEBUG: - debug(msg); - break; - default: - defaultMessage(msg); - break; - } - } - public static void error(String msg) { Utils.sendColorConsoleMessage(EventUtils.getStaticConsoleSender(), Utils.getPrefix() + "&8-> &e[&cERROR&e] &7" + msg); } @@ -58,9 +29,5 @@ public static void debug(String msg) { public static void defaultMessage(String msg) { Utils.sendColorConsoleMessage(EventUtils.getStaticConsoleSender(), Utils.getPrefix() + msg); } - - public enum Level { - ERROR, WARNING, INFO, SUCCESS, OUTLINE, DEBUG - } }