Archiviert
1
0

Update ArenaCommand

Dieser Commit ist enthalten in:
yoyosource 2022-07-18 16:19:48 +02:00
Ursprung 183248c0b1
Commit 8bcefb102c

Datei anzeigen

@ -30,6 +30,7 @@ import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
public class ArenaCommand extends SWCommand {
@ -62,10 +63,10 @@ public class ArenaCommand extends SWCommand {
@Override
public Collection<String> tabCompletes(CommandSender sender, String[] previousArguments, String s) {
return ProxyServer.getInstance().getServersCopy().values().stream().filter(server -> {
Subserver subserver = Subserver.getSubserver(server);
return subserver != null && subserver.getType() == Servertype.ARENA;
}).map(ServerInfo::getName).collect(Collectors.toList());
List<Subserver> subserverList = Subserver.getServerList();
synchronized (subserverList) {
return subserverList.stream().filter(subserver -> subserver.getType() == Servertype.ARENA).map(subserver -> subserver.getServer().getName()).collect(Collectors.toList());
}
}
};
}