Skip to content

Commit

Permalink
Remove plugin/config update detected delay
Browse files Browse the repository at this point in the history
  • Loading branch information
TenkyuChimata committed Dec 27, 2023
1 parent ae57b98 commit 926ac75
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/main/java/jp/wolfx/mceew/MCEEW.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,6 @@ private static void playSound(String alert_sound_type, double alert_sound_volume
}
}

private static void ThreadSleep() {
try {
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}

private void cancelScheduler() {
if (!folia) {
Bukkit.getScheduler().cancelTasks(this);
Expand Down Expand Up @@ -211,7 +203,6 @@ private void updater() {
String api_version = json.get("version").getAsString();
if (Integer.parseInt(api_version.replaceAll("\\.", "")) > Integer.parseInt(version.replaceAll("-b.*", "").replaceAll("\\.", ""))) {
Bukkit.getLogger().warning("[MCEEW] New plugin version v" + api_version + " detected, Please download a new version from https://acg.kr/mceew");
ThreadSleep();
} else {
Bukkit.getLogger().info("[MCEEW] You are running the latest plugin version.");
}
Expand All @@ -222,13 +213,16 @@ private void updater() {
}
if (current_config > config_version) {
Bukkit.getLogger().warning("[MCEEW] Configuration update detected, please delete the MCEEW configuration file to update it.");
ThreadSleep();
}
}

private static void wsReconnect() {
Bukkit.getLogger().warning("[MCEEW] Trying to reconnect to Websocket API...");
ThreadSleep();
try {
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
wsClient(false);
}

Expand Down

0 comments on commit 926ac75

Please sign in to comment.