Fix unreachable server error when update-checker is disabled
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Fixes #1.
This commit is contained in:
parent
552e12a813
commit
3e17b49d1c
@ -69,6 +69,10 @@ public class FileUtils
|
|||||||
|
|
||||||
UpdateChecker.task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, plugin.updateChecker, 1, 20 * 60 * 60 * 12); // 12 hours
|
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.invisibilityFix = config.getBoolean(ConfigEntries.INVISIBILITY_FIX.path);
|
||||||
PluginCache.sendJoinTpMessage = config.getBoolean(ConfigEntries.TELEPORTATION_TP_MESSAGE_ON_JOIN.path);
|
PluginCache.sendJoinTpMessage = config.getBoolean(ConfigEntries.TELEPORTATION_TP_MESSAGE_ON_JOIN.path);
|
||||||
|
@ -181,7 +181,6 @@ public class UpdateChecker implements Runnable
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void sendUnreachableCode(CommandSender sender)
|
public void sendUnreachableCode(CommandSender sender)
|
||||||
{
|
{
|
||||||
String pluginName = plugin.getName();
|
String pluginName = plugin.getName();
|
||||||
@ -248,7 +247,8 @@ public class UpdateChecker implements Runnable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isServerUnreachable)
|
if(isServerUnreachable)
|
||||||
{sendUnreachableCode(player);
|
{
|
||||||
|
sendUnreachableCode(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(errorCode != null)
|
if(errorCode != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user