Skip to content

Commit

Permalink
v1.7.4-pre.16 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonagamerpro1234 committed Feb 20, 2022
1 parent 8c0f233 commit eeccd5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 44 deletions.
4 changes: 2 additions & 2 deletions CustomJoinAndQuitMessages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>jss.customjoinandquitmessages</groupId>
<artifactId>CustomJoinAndQuitMessages</artifactId>
<version>1.7.4-Pre.15</version>
<version>1.7.4-Pre.16</version>

<name>CustomJoinAndQuitMessages</name>
<url>https://github.com/jonagamerpro1234/CustomJoinAndQuitMessages</url>
Expand Down Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -38,7 +37,6 @@ public class CustomJoinAndQuitMessages extends JavaPlugin{
private Map<String,Lang> 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;
Expand Down Expand Up @@ -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"));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public class Metrics {
* @param pluginId The id of the plugin.
* It can be found at <a href="https://bstats.org/what-is-my-plugin-id">What is my plugin id?</a>
*/
public Metrics(Plugin plugin) {
@SuppressWarnings("deprecation")
public Metrics(Plugin plugin) {
if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
}

}

0 comments on commit eeccd5c

Please sign in to comment.