package com.publicuhc.scatter;

import com.publicuhc.scatter.exceptions.ScatterLocationException;
import com.publicuhc.scatter.logic.ScatterLogic;
import com.publicuhc.scatter.zones.DeadZone;
import com.publicuhc.scatter.zones.DeadZoneBuilder;
import org.bukkit.Location;

import java.util.List;

public interface Scatterer {

    /**
     * Attempt to find safe locations
     *
     * @return list of locations outside of provided deadzones and outside of zones created by the builder
     * @throws ScatterLocationException if a location wasn't able to be fetched
     */
    List<Location> getScatterLocations(int amount) throws ScatterLocationException;

    void setLogic(ScatterLogic logic);

    ScatterLogic getLogic();

    void setDeadZoneBuilder(DeadZoneBuilder builder);

    DeadZoneBuilder getDeadZoneBuilder();

    List<DeadZone> getBaseDeadZones();

    void setBaseDeadZones(List<DeadZone> zones);

    void addBaseDeadZone(DeadZone zone);
}

package com.publicuhc.scatter;

import com.publicuhc.scatter.exceptions.ScatterLocationException;
import com.publicuhc.scatter.logic.ScatterLogic;
import com.publicuhc.scatter.zones.DeadZone;
import com.publicuhc.scatter.zones.DeadZoneBuilder;
import org.bukkit.Location;
import org.bukkit.entity.Player;

import java.util.List;

public interface Scatterer {

    /**
     * Attempt to find safe locations
     *
     * @return list of locations outside of provided deadzones and outside of zones created by the builder
     * @throws ScatterLocationException if a location wasn't able to be fetched
     */
    List<Location> getScatterLocations(int amount) throws ScatterLocationException;

    /**
     * Scatter the players provided.
     * <p>Teleports players after fetching all the valid locations</p>
     *
     * @param players the players to scatter
     * @throws ScatterLocationException
     */
    void scatterPlayers(List<Player> players) throws ScatterLocationException;

    void setLogic(ScatterLogic logic);

    ScatterLogic getLogic();

    void setDeadZoneBuilder(DeadZoneBuilder builder);

    DeadZoneBuilder getDeadZoneBuilder();

    List<DeadZone> getBaseDeadZones();

    void setBaseDeadZones(List<DeadZone> zones);

    void addBaseDeadZone(DeadZone zone);

    void clearBaseDeadZones();

    /**
     * Adds a base deadzone for every player provided using the DeadZoneBuilder
     * @param players the player to create deadzones for
     */
    void addDeadZonesForPlayers(List<Player> players);

    /**
     * Adds a base deadzone for every player online that isn't in the list provided using the DeadZoneBuilder
     * @param players the players to not create a deadzone for
     */
    void addDeadZonesForPlayersNotInList(List<Player> players);
}

add a way to clear base deadzones + add a base deadzone from a list of players