9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

clean: resource update checker create version variable

This commit is contained in:
LoJoSho
2025-01-17 13:36:04 -06:00
parent 67042106d5
commit 80a0ca2b15

View File

@@ -63,12 +63,13 @@ public abstract class HibiscusPlugin extends JavaPlugin {
.onSuccess((commandSenders, latestVersion) -> {
this.latestVersion = (String) latestVersion;
String pluginName = getDescription().getName();
String version = getDescription().getVersion();
if (!this.latestVersion.equalsIgnoreCase(getDescription().getVersion())) {
if (!this.latestVersion.equalsIgnoreCase(version)) {
getLogger().info("+++++++++++++++++++++++++++++++++++");
getLogger().info("There is a new update for " + pluginName + "!");
getLogger().info("Please download it as soon as possible for possible fixes and new features.");
getLogger().info("Current Version " + getDescription().getVersion() + " | Latest Version " + latestVersion);
getLogger().info("Current Version " + version + " | Latest Version " + latestVersion);
//getLogger().info("Spigot: https://www.spigotmc.org/resources/100107/");
getLogger().info("Polymart: https://polymart.org/resource/" + resourceID);
getLogger().info("+++++++++++++++++++++++++++++++++++");