PlotSquared/Core/src/main/java/com/plotsquared/plot/worlds/PlotAreaManager.java

51 lines
1.3 KiB
Java
Raw Normal View History

2020-04-11 02:19:18 +02:00
package com.plotsquared.plot.worlds;
2017-03-17 06:40:29 +01:00
2020-04-11 02:19:18 +02:00
import com.plotsquared.location.Location;
import com.plotsquared.plot.PlotArea;
import com.sk89q.worldedit.regions.CuboidRegion;
import org.jetbrains.annotations.NotNull;
2017-03-17 06:40:29 +01:00
public interface PlotAreaManager {
/**
* Get the plot area for a particular location. This
* method assumes that the caller already knows that
* the location belongs to a plot area, in which
* case it will return the appropriate plot area.
*
* If the location does not belong to a plot area,
* it may still return an area.
*
* @param location The location
* @return An applicable area, or null
*/
PlotArea getApplicablePlotArea(Location location);
2018-08-10 17:01:10 +02:00
/**
* Get the plot area, if there is any, for the given
* location. This may return null, if given location
* does not belong to a plot area.
*
* @param location The location
* @return The area, if found
*/
PlotArea getPlotArea(@NotNull Location location);
2018-08-10 17:01:10 +02:00
PlotArea getPlotArea(String world, String id);
2018-08-10 17:01:10 +02:00
PlotArea[] getPlotAreas(String world, CuboidRegion region);
2018-08-10 17:01:10 +02:00
PlotArea[] getAllPlotAreas();
2018-08-10 17:01:10 +02:00
String[] getAllWorlds();
2018-08-10 17:01:10 +02:00
void addPlotArea(PlotArea area);
2018-08-10 17:01:10 +02:00
void removePlotArea(PlotArea area);
2018-08-10 17:01:10 +02:00
void addWorld(String worldName);
2018-08-10 17:01:10 +02:00
void removeWorld(String worldName);
2017-03-17 06:40:29 +01:00
}