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:
Commit
2da0e1cad7
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren