From 7784ee46a50d3e62c3c6672db8e72a13b1e6d409 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Mon, 7 Nov 2022 00:18:13 +0100 Subject: [PATCH] Adds an alert if an update is available --- src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java index 3892c40..4491a24 100644 --- a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java +++ b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java @@ -16,6 +16,7 @@ import net.knarcraft.blacksmith.trait.BlacksmithTrait; import net.knarcraft.knarlib.KnarLib; import net.knarcraft.knarlib.formatting.TranslatableTimeUnit; import net.knarcraft.knarlib.formatting.Translator; +import net.knarcraft.knarlib.util.UpdateChecker; import org.bukkit.command.PluginCommand; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.plugin.PluginManager; @@ -99,6 +100,10 @@ public class BlacksmithPlugin extends JavaPlugin { registerListeners(); getLogger().log(Level.INFO, " v" + getDescription().getVersion() + " enabled."); + + //Alert about an update in the console + UpdateChecker.checkForUpdate(this, "https://api.spigotmc.org/legacy/update.php?resource=105938", + () -> this.getDescription().getVersion(), null); } /**