Package com.plotsquared.core.plot.world
Class SinglePlotAreaManager
java.lang.Object
com.plotsquared.core.plot.world.DefaultPlotAreaManager
com.plotsquared.core.plot.world.SinglePlotAreaManager
- All Implemented Interfaces:
PlotAreaManager
-
Constructor Summary
ConstructorDescriptionSinglePlotAreaManager
(@NonNull EventDispatcher eventDispatcher, @NonNull PlotListener plotListener, @NonNull YamlConfiguration worldConfiguration, @NonNull GlobalBlockQueue blockQueue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlotArea
(@NonNull PlotArea area) Add a plot areavoid
Add a worldGet all plot areas recognized by PlotSquaredGet all worlds recognized by PlotSquaredgetApplicablePlotArea
(@Nullable Location location) Get the plot area for a particular location.getArea()
getPlotArea
(@NonNull Location location) Get the plot area, if there is any, for the given location.getPlotArea
(@NonNull String world, @NonNull String id) Get the plot area in a world with an (optional ID).getPlotAreas
(@NonNull String world, @NonNull CuboidRegion region) Get all plot areas in a world, with an optional region constraintboolean
void
removePlotArea
(@NonNull PlotArea area) Remove a plot areavoid
removeWorld
(@NonNull String worldName) Remove a worldvoid
setArea
(@NonNull SinglePlotArea area) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.plotsquared.core.plot.world.PlotAreaManager
forEachPlotArea, getPlotAreaByString, getPlotAreasSet, getPlotAreasSet, hasPlotArea, isAugmented
-
Constructor Details
-
SinglePlotAreaManager
@Inject public SinglePlotAreaManager(@NonNull EventDispatcher eventDispatcher, @NonNull PlotListener plotListener, @NonNull YamlConfiguration worldConfiguration, @NonNull GlobalBlockQueue blockQueue)
-
-
Method Details
-
getArea
-
setArea
-
isWorld
-
getApplicablePlotArea
Description copied from 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.
- Specified by:
getApplicablePlotArea
in interfacePlotAreaManager
- Overrides:
getApplicablePlotArea
in classDefaultPlotAreaManager
- Parameters:
location
- The location- Returns:
- An applicable area, or null
-
getPlotArea
Description copied from interface:PlotAreaManager
Get the plot area in a world with an (optional ID). If the world has more than one plot area, and ID must be supplied. If the world only has one plot area, the ID will be ignored- Specified by:
getPlotArea
in interfacePlotAreaManager
- Overrides:
getPlotArea
in classDefaultPlotAreaManager
- Parameters:
world
- World nameid
- Area ID- Returns:
- Plot area matching the criteria
-
getPlotArea
Description copied from interface:PlotAreaManager
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.- Specified by:
getPlotArea
in interfacePlotAreaManager
- Overrides:
getPlotArea
in classDefaultPlotAreaManager
- Parameters:
location
- The location- Returns:
- The area if found, else
null
-
getPlotAreas
Description copied from interface:PlotAreaManager
Get all plot areas in a world, with an optional region constraint- Specified by:
getPlotAreas
in interfacePlotAreaManager
- Overrides:
getPlotAreas
in classDefaultPlotAreaManager
- Parameters:
world
- World nameregion
- Optional region- Returns:
- All plots in the region
-
getAllPlotAreas
Description copied from interface:PlotAreaManager
Get all plot areas recognized by PlotSquared- Specified by:
getAllPlotAreas
in interfacePlotAreaManager
- Overrides:
getAllPlotAreas
in classDefaultPlotAreaManager
- Returns:
- All plot areas
-
getAllWorlds
Description copied from interface:PlotAreaManager
Get all worlds recognized by PlotSquared- Specified by:
getAllWorlds
in interfacePlotAreaManager
- Overrides:
getAllWorlds
in classDefaultPlotAreaManager
- Returns:
- All world names
-
addPlotArea
Description copied from interface:PlotAreaManager
Add a plot area- Specified by:
addPlotArea
in interfacePlotAreaManager
- Overrides:
addPlotArea
in classDefaultPlotAreaManager
- Parameters:
area
- Area
-
removePlotArea
Description copied from interface:PlotAreaManager
Remove a plot area- Specified by:
removePlotArea
in interfacePlotAreaManager
- Overrides:
removePlotArea
in classDefaultPlotAreaManager
- Parameters:
area
- Area
-
addWorld
Description copied from interface:PlotAreaManager
Add a world- Specified by:
addWorld
in interfacePlotAreaManager
- Overrides:
addWorld
in classDefaultPlotAreaManager
- Parameters:
worldName
- Name of the world to add
-
removeWorld
Description copied from interface:PlotAreaManager
Remove a world- Specified by:
removeWorld
in interfacePlotAreaManager
- Overrides:
removeWorld
in classDefaultPlotAreaManager
- Parameters:
worldName
- Name of the world to remove
-