Don't update on errory start if they asked not to update on errory start
This commit is contained in:
parent
06dc0baafe
commit
f4d19ab3ce
@ -217,7 +217,7 @@ public class DisguiseConfig {
|
||||
@Getter
|
||||
private static String savedServerIp = "";
|
||||
@Getter
|
||||
private static boolean autoUpdate;
|
||||
private static Boolean autoUpdate;
|
||||
@Getter
|
||||
private static boolean notifyUpdate;
|
||||
private static BukkitTask updaterTask;
|
||||
@ -279,6 +279,14 @@ public class DisguiseConfig {
|
||||
return getPlayerNameType() == PlayerNameType.EXTENDED;
|
||||
}
|
||||
|
||||
public static boolean isAutoUpdate() {
|
||||
if (getAutoUpdate() == null) {
|
||||
autoUpdate = LibsDisguises.getInstance().getConfig().getBoolean("AutoUpdate");
|
||||
}
|
||||
|
||||
return getAutoUpdate();
|
||||
}
|
||||
|
||||
public static void setAutoUpdate(boolean update) {
|
||||
if (isAutoUpdate() == update) {
|
||||
return;
|
||||
|
@ -105,7 +105,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
try {
|
||||
if (isNumberedBuild()) {
|
||||
if (isNumberedBuild() && DisguiseConfig.isAutoUpdate()) {
|
||||
getUpdateChecker().doUpdate();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
@ -260,7 +260,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
new MetricsInitalizer();
|
||||
} catch (Throwable throwable) {
|
||||
try {
|
||||
if (isNumberedBuild()) {
|
||||
if (isNumberedBuild() && DisguiseConfig.isAutoUpdate()) {
|
||||
getUpdateChecker().doUpdate();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
|
Loading…
Reference in New Issue
Block a user