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
ConstructorsConstructorDescriptionSinglePlotAreaManager(@NonNull EventDispatcher eventDispatcher, @NonNull PlotListener plotListener, @NonNull YamlConfiguration worldConfiguration, @NonNull GlobalBlockQueue blockQueue) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlotArea(@NonNull PlotArea area) Add a plot areavoidAdd 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 constraintbooleanvoidremovePlotArea(@NonNull PlotArea area) Remove a plot areavoidremoveWorld(@NonNull String worldName) Remove a worldvoidsetArea(@NonNull SinglePlotArea area) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:PlotAreaManagerGet 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:
getApplicablePlotAreain interfacePlotAreaManager- Overrides:
getApplicablePlotAreain classDefaultPlotAreaManager- Parameters:
location- The location- Returns:
- An applicable area, or null
-
getPlotArea
Description copied from interface:PlotAreaManagerGet 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:
getPlotAreain interfacePlotAreaManager- Overrides:
getPlotAreain classDefaultPlotAreaManager- Parameters:
world- World nameid- Area ID- Returns:
- Plot area matching the criteria
-
getPlotArea
Description copied from interface:PlotAreaManagerGet 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:
getPlotAreain interfacePlotAreaManager- Overrides:
getPlotAreain classDefaultPlotAreaManager- Parameters:
location- The location- Returns:
- The area if found, else
null
-
getPlotAreas
Description copied from interface:PlotAreaManagerGet all plot areas in a world, with an optional region constraint- Specified by:
getPlotAreasin interfacePlotAreaManager- Overrides:
getPlotAreasin classDefaultPlotAreaManager- Parameters:
world- World nameregion- Optional region- Returns:
- All plots in the region
-
getAllPlotAreas
Description copied from interface:PlotAreaManagerGet all plot areas recognized by PlotSquared- Specified by:
getAllPlotAreasin interfacePlotAreaManager- Overrides:
getAllPlotAreasin classDefaultPlotAreaManager- Returns:
- All plot areas
-
getAllWorlds
Description copied from interface:PlotAreaManagerGet all worlds recognized by PlotSquared- Specified by:
getAllWorldsin interfacePlotAreaManager- Overrides:
getAllWorldsin classDefaultPlotAreaManager- Returns:
- All world names
-
addPlotArea
Description copied from interface:PlotAreaManagerAdd a plot area- Specified by:
addPlotAreain interfacePlotAreaManager- Overrides:
addPlotAreain classDefaultPlotAreaManager- Parameters:
area- Area
-
removePlotArea
Description copied from interface:PlotAreaManagerRemove a plot area- Specified by:
removePlotAreain interfacePlotAreaManager- Overrides:
removePlotAreain classDefaultPlotAreaManager- Parameters:
area- Area
-
addWorld
Description copied from interface:PlotAreaManagerAdd a world- Specified by:
addWorldin interfacePlotAreaManager- Overrides:
addWorldin classDefaultPlotAreaManager- Parameters:
worldName- Name of the world to add
-
removeWorld
Description copied from interface:PlotAreaManagerRemove a world- Specified by:
removeWorldin interfacePlotAreaManager- Overrides:
removeWorldin classDefaultPlotAreaManager- Parameters:
worldName- Name of the world to remove
-