Really fix the semi-rare error when a server is offline on bungeecord
This commit is contained in:
+1
@@ -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;
|
||||
|
||||
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user