mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-02 08:27:30 +02:00
Add a few extra null checks into ProtocolDetectorService
Under certain conditions these can be null.
This commit is contained in:
parent
ab1a586b4c
commit
12c21c9b0a
@ -54,7 +54,7 @@ public class ProtocolDetectorService implements Runnable {
|
||||
serverInfo.ping(new Callback<ServerPing>() {
|
||||
@Override
|
||||
public void done(ServerPing serverPing, Throwable throwable) {
|
||||
if (throwable == null) {
|
||||
if (throwable == null && serverPing != null && serverPing.getVersion() != null) {
|
||||
detectedProtocolIds.put(key, serverPing.getVersion().getProtocol());
|
||||
if (((BungeeConfigAPI) Via.getConfig()).isBungeePingSave()) {
|
||||
Map<String, Integer> servers = ((BungeeConfigAPI) Via.getConfig()).getBungeeServerProtocols();
|
||||
@ -69,7 +69,6 @@ public class ProtocolDetectorService implements Runnable {
|
||||
}
|
||||
// Save
|
||||
Via.getPlatform().getConfigurationProvider().saveConfig();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user