diff --git a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java index e077bc26e..bf7f1ff01 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java +++ b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java @@ -28,6 +28,7 @@ import us.myles.ViaVersion.util.GsonUtil; import java.util.ArrayList; import java.util.Collections; +import java.util.Collection; import java.util.List; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -126,9 +127,10 @@ public class BungeePlugin extends Plugin implements ViaPlatform, @Override public ViaCommandSender[] getOnlinePlayers() { - ViaCommandSender[] array = new ViaCommandSender[getProxy().getPlayers().size()]; + Collection players = getProxy().getPlayers(); + ViaCommandSender[] array = new ViaCommandSender[players.size()]; int i = 0; - for (ProxiedPlayer player : getProxy().getPlayers()) { + for (ProxiedPlayer player : players) { array[i++] = new BungeeCommandSender(player); } return array; diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java index 6b86d5970..29d910c96 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java @@ -210,7 +210,7 @@ public class Protocol1_13To1_12_2 extends Protocol 1.12.2 statistic mapping for " + name); } - } else { + } else if (split.length > 2) { String category = split[1]; //TODO convert string ids (blocks, items, entities) switch (category) {