Search in sources :

Example 1 with BukkitCommandSender

use of com.viaversion.viaversion.bukkit.commands.BukkitCommandSender in project ViaVersion by ViaVersion.

the class ViaVersionPlugin method getOnlinePlayers.

@Override
public ViaCommandSender[] getOnlinePlayers() {
    ViaCommandSender[] array = new ViaCommandSender[Bukkit.getOnlinePlayers().size()];
    int i = 0;
    for (Player player : Bukkit.getOnlinePlayers()) {
        array[i++] = new BukkitCommandSender(player);
    }
    return array;
}
Also used : ViaCommandSender(com.viaversion.viaversion.api.command.ViaCommandSender) Player(org.bukkit.entity.Player) BukkitCommandSender(com.viaversion.viaversion.bukkit.commands.BukkitCommandSender)

Aggregations

ViaCommandSender (com.viaversion.viaversion.api.command.ViaCommandSender)1 BukkitCommandSender (com.viaversion.viaversion.bukkit.commands.BukkitCommandSender)1 Player (org.bukkit.entity.Player)1