3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-04 23:30:24 +01:00

Merge pull request #2198 from terrarier2111/patch-3

Created a local variable for ProxiedPlayers
Dieser Commit ist enthalten in:
Myles 2020-12-11 09:17:16 +00:00 committet von GitHub
Commit 2da0e1cad7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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<ProxiedPlayer>,
@Override
public ViaCommandSender[] getOnlinePlayers() {
ViaCommandSender[] array = new ViaCommandSender[getProxy().getPlayers().size()];
Collection<ProxiedPlayer> 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;