Fix unreachable server error when update-checker is disabled
continuous-integration/drone/push Build is passing Details

Fixes #1.
This commit is contained in:
Bea 2023-02-11 20:37:10 +01:00
parent 552e12a813
commit 3e17b49d1c
2 changed files with 6 additions and 2 deletions

View File

@ -69,6 +69,10 @@ public class FileUtils
UpdateChecker.task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, plugin.updateChecker, 1, 20 * 60 * 60 * 12); // 12 hours
}
else
{
PluginCache.updateChecker = false;
}
PluginCache.invisibilityFix = config.getBoolean(ConfigEntries.INVISIBILITY_FIX.path);
PluginCache.sendJoinTpMessage = config.getBoolean(ConfigEntries.TELEPORTATION_TP_MESSAGE_ON_JOIN.path);

View File

@ -181,7 +181,6 @@ public class UpdateChecker implements Runnable
}
public void sendUnreachableCode(CommandSender sender)
{
String pluginName = plugin.getName();
@ -248,7 +247,8 @@ public class UpdateChecker implements Runnable
}
if(isServerUnreachable)
{sendUnreachableCode(player);
{
sendUnreachableCode(player);
}
if(errorCode != null)