good enough

This commit is contained in:
Minecon724 2024-06-26 15:16:21 +02:00
parent 39148ee7f1
commit 77a1c8549b
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -35,18 +35,20 @@ public class UpdateNotifier extends BukkitRunnable implements Listener { // TODO
@Override
public void run() {
DebugLogger.info("update task running", 2);
try {
latestVersion = updater.getLatestVersion().join();
} catch (CompletionException e) {
Throwable ex = e.getCause();
if (ex instanceof IOException)
DebugLogger.info("error trying to contact update server: %d", 0, ex.getMessage());
if (ex instanceof IOException)
DebugLogger.info("error trying to contact update server: %s", 0, ex.getMessage());
else e.printStackTrace();
}
if (latestVersion == null) return;
DebugLogger.info("RealWeather is outdated. /rwadmin update", 0);
for (Player player : plugin.getServer().getOnlinePlayers()) {
if (player.hasPermission("realweather.update.notify")) {