Configurable version update interval
This commit is contained in:
@@ -269,4 +269,9 @@ public class AkarinGlobalConfig {
|
||||
private static void playersInfoUpdateInterval() {
|
||||
playersInfoUpdateInterval = getSeconds(getString("core.tick-rate.players-info-update-interval", "30s")) * 10;
|
||||
}
|
||||
|
||||
public static long versionUpdateInterval;
|
||||
private static void versionUpdateInterval() {
|
||||
versionUpdateInterval = getSeconds(getString("alternative.version-update-interval", "3600s")) * 1000; // 1 hour
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public abstract class MixinVersionCommand {
|
||||
|
||||
if (hasVersion) {
|
||||
long current = System.currentTimeMillis();
|
||||
if (current - lastCheckMillis > 7200000 /* 2 hours */) {
|
||||
if (current - lastCheckMillis > AkarinGlobalConfig.versionUpdateInterval) {
|
||||
lastCheckMillis = current;
|
||||
hasVersion = false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user