Fixed wait-after-online not doing anything

This commit is contained in:
ajgeiss0702
2023-08-06 08:33:41 -07:00
parent 6592925c6d
commit 1f875fa622
3 changed files with 14 additions and 2 deletions
@@ -112,6 +112,11 @@ public class BungeeServer implements AdaptedServer {
return System.currentTimeMillis()-lastOffline <= (AjQueueAPI.getInstance().getConfig().getDouble("wait-time") * 2 * 1000) && isOnline();
}
@Override
public boolean shouldWaitAfterOnline() {
return System.currentTimeMillis()-lastOffline <= (AjQueueAPI.getInstance().getConfig().getDouble("wait-after-online") * 2 * 1000) && getLastPing().isPresent();
}
@Override
public ServerInfo getHandle() {
return handle;
@@ -117,6 +117,11 @@ public class VelocityServer implements AdaptedServer {
return System.currentTimeMillis()-lastOffline <= (AjQueueAPI.getInstance().getConfig().getDouble("wait-time") * 2 * 1000) && isOnline();
}
@Override
public boolean shouldWaitAfterOnline() {
return System.currentTimeMillis()-lastOffline <= (AjQueueAPI.getInstance().getConfig().getDouble("wait-after-online") * 2 * 1000) && getLastPing().isPresent();
}
@Override
public RegisteredServer getHandle() {
return handle;