Check if the player is ported, fix NullPointerException post 876 on spigotmc.org (#374)

This commit is contained in:
Mats 2016-04-24 13:29:52 +02:00 committed by Myles
parent 8e64fb8c21
commit 0374da573b

View File

@ -35,6 +35,8 @@ public class PPSSubCmd extends ViaSubCommand {
long max = 0;
for (Player p : Bukkit.getOnlinePlayers()) {
if (!ViaVersion.getInstance().isPorted(p))
continue;
int playerVersion = ViaVersion.getInstance().getPlayerVersion(p);
if (!playerVersions.containsKey(playerVersion))
playerVersions.put(playerVersion, new HashSet<String>());