9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-28 03:19:15 +00:00

Added update checker

This commit is contained in:
LoJoSho
2023-01-14 11:34:05 -06:00
parent b261597b0e
commit a341731a75
3 changed files with 14 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ import com.hibiscusmc.hmccosmetics.listener.PlayerGameListener;
import com.hibiscusmc.hmccosmetics.nms.NMSHandlers;
import com.hibiscusmc.hmccosmetics.util.MessagesUtil;
import com.hibiscusmc.hmccosmetics.util.TranslationUtil;
import com.jeff_media.updatechecker.UpdateCheckSource;
import com.jeff_media.updatechecker.UpdateChecker;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -58,6 +60,12 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
return;
}
// Update Checker
new UpdateChecker(this, UpdateCheckSource.POLYMART, "1879")
.setDownloadLink("https://polymart.org/resource/1879")
.checkEveryXHours(24)
.checkNow();
// File setup
if (!getDataFolder().exists()) {
saveDefaultConfig();