3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 22:02:50 +02:00

Ensure connection isn’t null (reloads etc), fixes #674

Dieser Commit ist enthalten in:
Myles 2017-05-27 20:41:00 +01:00
Ursprung 5b5f0dce24
Commit d8f55006ff

Datei anzeigen

@ -36,7 +36,7 @@ public class PPSSubCmd extends ViaSubCommand {
if (!playerVersions.containsKey(playerVersion))
playerVersions.put(playerVersion, new HashSet<String>());
UserConnection uc = Via.getManager().getConnection(p.getUUID());
if (uc.getPacketsPerSecond() > -1) {
if (uc != null && uc.getPacketsPerSecond() > -1) {
playerVersions.get(playerVersion).add(p.getName() + " (" + uc.getPacketsPerSecond() + " PPS)");
totalPackets += uc.getPacketsPerSecond();
if (uc.getPacketsPerSecond() > max) {