Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Don't use -1 if provided by ProtocolDetectorService on Bungee #1064
Dieser Commit ist enthalten in:
Ursprung
b9750be745
Commit
e6922eae46
@ -58,6 +58,8 @@ public class ProtocolDetectorService implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void done(ServerPing serverPing, Throwable throwable) {
|
public void done(ServerPing serverPing, Throwable throwable) {
|
||||||
if (throwable == null && serverPing != null && serverPing.getVersion() != null) {
|
if (throwable == null && serverPing != null && serverPing.getVersion() != null) {
|
||||||
|
// Ensure protocol is positive, some services will return -1
|
||||||
|
if (serverPing.getVersion().getProtocol() > 0) {
|
||||||
detectedProtocolIds.put(key, serverPing.getVersion().getProtocol());
|
detectedProtocolIds.put(key, serverPing.getVersion().getProtocol());
|
||||||
if (((BungeeConfigAPI) Via.getConfig()).isBungeePingSave()) {
|
if (((BungeeConfigAPI) Via.getConfig()).isBungeePingSave()) {
|
||||||
Map<String, Integer> servers = ((BungeeConfigAPI) Via.getConfig()).getBungeeServerProtocols();
|
Map<String, Integer> servers = ((BungeeConfigAPI) Via.getConfig()).getBungeeServerProtocols();
|
||||||
@ -74,6 +76,7 @@ public class ProtocolDetectorService implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren