Really fix the semi-rare error when a server is offline on bungeecord

This commit is contained in:
ajgeiss0702
2023-01-11 09:12:58 -07:00
parent c4983ca5ff
commit 555ef21192
2 changed files with 3 additions and 1 deletions
@@ -54,6 +54,7 @@ public class BungeeServer implements AdaptedServer {
handle.ping((pp, error) -> {
if(error != null || pp == null) {
markOffline(debug, logger, future, sent, error);
return;
}
offlineTime = 0;
@@ -4,6 +4,7 @@ import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.chat.BaseComponent;
import org.jetbrains.annotations.NotNull;
import us.ajg0702.queue.api.server.AdaptedServerPing;
public class BungeeServerPing implements AdaptedServerPing {
@@ -11,7 +12,7 @@ public class BungeeServerPing implements AdaptedServerPing {
final ServerPing handle;
private final long sent;
public BungeeServerPing(ServerPing handle, long sent) {
public BungeeServerPing(@NotNull ServerPing handle, long sent) {
this.handle = handle;
this.sent = sent;
}