mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-23 15:21:20 +01:00
allow update checker to be disabled
Took 2 minutes
This commit is contained in:
parent
0103911c07
commit
c3832374ad
@ -255,6 +255,7 @@ public class AuctionHouse extends TweetyPlugin {
|
||||
}
|
||||
|
||||
// update check
|
||||
if (Settings.UPDATE_CHECKER.getBoolean())
|
||||
getServer().getScheduler().runTaskLaterAsynchronously(this, () -> this.status = new UpdateChecker(this, 60325, getConsole()).check().getStatus(), 1L);
|
||||
|
||||
// metrics
|
||||
|
@ -6,6 +6,7 @@ import ca.tweetzy.auctionhouse.api.UpdateChecker;
|
||||
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
|
||||
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
|
||||
import ca.tweetzy.auctionhouse.helpers.PlayerHelper;
|
||||
import ca.tweetzy.auctionhouse.settings.Settings;
|
||||
import ca.tweetzy.core.compatibility.ServerVersion;
|
||||
import ca.tweetzy.core.compatibility.XMaterial;
|
||||
import ca.tweetzy.core.utils.PlayerUtils;
|
||||
@ -45,7 +46,7 @@ public class PlayerListeners implements Listener {
|
||||
Bukkit.getServer().getScheduler().runTaskLaterAsynchronously(AuctionHouse.getInstance(), () -> {
|
||||
AuctionHouse.getInstance().getAuctionPlayerManager().addPlayer(new AuctionPlayer(player));
|
||||
AuctionHouse.getInstance().getLogger().info("Adding player: " + player.getName() + " to Auction Player list.");
|
||||
if (AuctionHouse.getInstance().getStatus() == UpdateChecker.UpdateStatus.UNRELEASED_VERSION && player.isOp()) {
|
||||
if (Settings.UPDATE_CHECKER.getBoolean() && AuctionHouse.getInstance().getStatus() == UpdateChecker.UpdateStatus.UNRELEASED_VERSION && player.isOp()) {
|
||||
AuctionHouse.getInstance().getLocale().newMessage(TextUtils.formatText(String.format("&dYou're running an unreleased version of Auction House &f(&c%s&f)", AuctionHouse.getInstance().getDescription().getVersion()))).sendPrefixedMessage(player);
|
||||
}
|
||||
}, 20);
|
||||
|
@ -28,6 +28,7 @@ public class Settings {
|
||||
);
|
||||
|
||||
public static final ConfigSetting ALLOW_USAGE_OF_IN_GAME_EDITOR = new ConfigSetting(config, "Allow Usage Of This Menu In Game", true, "Once you set this to true, you will no longer be able to access it unless you enable it within the actual config.yml");
|
||||
public static final ConfigSetting UPDATE_CHECKER = new ConfigSetting(config, "update checker", true, "If true, auction house will check for updates periodically");
|
||||
|
||||
|
||||
/* ===============================
|
||||
|
Loading…
Reference in New Issue
Block a user