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
|
@Getter
|
||||||
private static String savedServerIp = "";
|
private static String savedServerIp = "";
|
||||||
@Getter
|
@Getter
|
||||||
private static boolean autoUpdate;
|
private static Boolean autoUpdate;
|
||||||
@Getter
|
@Getter
|
||||||
private static boolean notifyUpdate;
|
private static boolean notifyUpdate;
|
||||||
private static BukkitTask updaterTask;
|
private static BukkitTask updaterTask;
|
||||||
@ -279,6 +279,14 @@ public class DisguiseConfig {
|
|||||||
return getPlayerNameType() == PlayerNameType.EXTENDED;
|
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) {
|
public static void setAutoUpdate(boolean update) {
|
||||||
if (isAutoUpdate() == update) {
|
if (isAutoUpdate() == update) {
|
||||||
return;
|
return;
|
||||||
|
@ -105,7 +105,7 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
try {
|
try {
|
||||||
if (isNumberedBuild()) {
|
if (isNumberedBuild() && DisguiseConfig.isAutoUpdate()) {
|
||||||
getUpdateChecker().doUpdate();
|
getUpdateChecker().doUpdate();
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
@ -260,7 +260,7 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
new MetricsInitalizer();
|
new MetricsInitalizer();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
try {
|
try {
|
||||||
if (isNumberedBuild()) {
|
if (isNumberedBuild() && DisguiseConfig.isAutoUpdate()) {
|
||||||
getUpdateChecker().doUpdate();
|
getUpdateChecker().doUpdate();
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
Loading…
Reference in New Issue
Block a user