Adds an alert if an update is available
This commit is contained in:
parent
3c805ee284
commit
7784ee46a5
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user