Search in sources :

Example 1 with BungeeCommandSender

use of com.viaversion.viaversion.bungee.commands.BungeeCommandSender in project ViaVersion by ViaVersion.

the class BungeePlugin method getOnlinePlayers.

@Override
public ViaCommandSender[] getOnlinePlayers() {
    Collection<ProxiedPlayer> players = getProxy().getPlayers();
    ViaCommandSender[] array = new ViaCommandSender[players.size()];
    int i = 0;
    for (ProxiedPlayer player : players) {
        array[i++] = new BungeeCommandSender(player);
    }
    return array;
}
Also used : ViaCommandSender(com.viaversion.viaversion.api.command.ViaCommandSender) ProxiedPlayer(net.md_5.bungee.api.connection.ProxiedPlayer) BungeeCommandSender(com.viaversion.viaversion.bungee.commands.BungeeCommandSender)

Aggregations

ViaCommandSender (com.viaversion.viaversion.api.command.ViaCommandSender)1 BungeeCommandSender (com.viaversion.viaversion.bungee.commands.BungeeCommandSender)1 ProxiedPlayer (net.md_5.bungee.api.connection.ProxiedPlayer)1