geforkt von SteamWar/BungeeCore
Update ArenaCommand
Dieser Commit ist enthalten in:
Ursprung
183248c0b1
Commit
8bcefb102c
@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren