package eu.mhsl.minenet.minigames.message;

import net.kyori.adventure.audience.Audience;
import net.minestom.server.entity.Player;

import java.util.Collection;
import java.util.Set;

//TODO maybe async large batches
public interface Sendable {
    void send(Player p);

    default void send(Audience players) {
        players.forEachAudience(audience -> this.send((Player) audience));
    }

    default void send(Collection<Player> players) {
        players.forEach(this::send);
    }

    default void send(Set<Player> players) {
        players.forEach(this::send);
    }
}
