Package com.plotsquared.core.plot.world
Class SinglePlotManager
java.lang.Object
com.plotsquared.core.plot.PlotManager
com.plotsquared.core.plot.world.SinglePlotManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclaimPlot(@NonNull Plot plot, @Nullable QueueCoordinator queue) booleanclearPlot(@NonNull Plot plot, Runnable whenDone, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue) booleancreateRoadEast(@NonNull Plot plot, @Nullable QueueCoordinator queue) Create the road east of the plot (not schematic-based)booleancreateRoadSouth(@NonNull Plot plot, @Nullable QueueCoordinator queue) Create the road south of the plot (not schematic-based)booleancreateRoadSouthEast(@NonNull Plot plot, @Nullable QueueCoordinator queue) Create the south-east corner of the road (intersection, not schematic-based)booleanfinishPlotMerge(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue) Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).booleanfinishPlotUnlink(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue) Finished off an unlink by resetting the top wall block for unlinked plotsgetPlotBottomLocAbs(@NonNull PlotId plotId) String[]getPlotComponents(@NonNull PlotId plotId) Get an array of the plot's component values as stringgetPlotId(int x, int y, int z) getPlotIdAbs(int x, int y, int z) getPlotTopLocAbs(@NonNull PlotId plotId) getSignLoc(@NonNull Plot plot) Retrieves the location of where a sign should be for a plot.booleanSets all the blocks along all the plot walls to their correct state (claimed or unclaimed).booleanremoveRoadEast(@NonNull Plot plot, @Nullable QueueCoordinator queue) Replace the road to the east of the plot with standard plot blocks (for when merging plots)booleanremoveRoadSouth(@NonNull Plot plot, @Nullable QueueCoordinator queue) Replace the road to the south of the plot with standard plot blocks (for when merging plots)booleanremoveRoadSouthEast(@NonNull Plot plot, @Nullable QueueCoordinator queue) Replace the road to the south east of the plot (intersection) with standard plot blocks (for when merging plots)booleansetComponent(@NonNull PlotId plotId, @NonNull String component, @NonNull Pattern blocks, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue) Set the specified components to the specified Pattern on the specified plot.booleanstartPlotMerge(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue) booleanstartPlotUnlink(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue) booleanunClaimPlot(@NonNull Plot plot, Runnable whenDone, @Nullable QueueCoordinator queue) Completes block changes associated with plot unclaim.Methods inherited from class com.plotsquared.core.plot.PlotManager
exportTemplate, getWorldHeight
-
Constructor Details
-
SinglePlotManager
-
-
Method Details
-
getPlotIdAbs
- Specified by:
getPlotIdAbsin classPlotManager
-
getPlotId
- Specified by:
getPlotIdin classPlotManager
-
getPlotBottomLocAbs
- Specified by:
getPlotBottomLocAbsin classPlotManager
-
getPlotTopLocAbs
- Specified by:
getPlotTopLocAbsin classPlotManager
-
clearPlot
public boolean clearPlot(@NonNull Plot plot, Runnable whenDone, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue) - Specified by:
clearPlotin classPlotManager
-
claimPlot
- Specified by:
claimPlotin classPlotManager
-
unClaimPlot
Description copied from class:PlotManagerCompletes block changes associated with plot unclaim.- Specified by:
unClaimPlotin classPlotManager- Parameters:
plot- plot to unclaimwhenDone- task to run when plot is unclaimedqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
getSignLoc
Description copied from class:PlotManagerRetrieves the location of where a sign should be for a plot.- Specified by:
getSignLocin classPlotManager- Parameters:
plot- The plot- Returns:
- The location where a sign should be
-
getPlotComponents
Description copied from class:PlotManagerGet an array of the plot's component values as string- Specified by:
getPlotComponentsin classPlotManager- Parameters:
plotId- plotId to get components of- Returns:
- array of plot's component values
-
setComponent
public boolean setComponent(@NonNull PlotId plotId, @NonNull String component, @NonNull Pattern blocks, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue) Description copied from class:PlotManagerSet the specified components to the specified Pattern on the specified plot.- Specified by:
setComponentin classPlotManager- Parameters:
plotId- id of plot to set component tocomponent- FLOOR, WALL, AIR, MAIN, MIDDLE, OUTLINE, BORDER, ALL (floor, air and main).blocks- Pattern to set component toactor- The player executing the taskqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
createRoadEast
Description copied from class:PlotManagerCreate the road east of the plot (not schematic-based)- Specified by:
createRoadEastin classPlotManager- Parameters:
plot- plot to create the road forqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
createRoadSouth
Description copied from class:PlotManagerCreate the road south of the plot (not schematic-based)- Specified by:
createRoadSouthin classPlotManager- Parameters:
plot- plot to create the road forqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
createRoadSouthEast
Description copied from class:PlotManagerCreate the south-east corner of the road (intersection, not schematic-based)- Specified by:
createRoadSouthEastin classPlotManager- Parameters:
plot- plot to create the road forqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
removeRoadEast
Description copied from class:PlotManagerReplace the road to the east of the plot with standard plot blocks (for when merging plots)- Specified by:
removeRoadEastin classPlotManager- Parameters:
plot- plot to remove east road fromqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
removeRoadSouth
Description copied from class:PlotManagerReplace the road to the south of the plot with standard plot blocks (for when merging plots)- Specified by:
removeRoadSouthin classPlotManager- Parameters:
plot- plot to remove south road fromqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
removeRoadSouthEast
Description copied from class:PlotManagerReplace the road to the south east of the plot (intersection) with standard plot blocks (for when merging plots)- Specified by:
removeRoadSouthEastin classPlotManager- Parameters:
plot- plot to remove south east road intersection fromqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
startPlotMerge
- Specified by:
startPlotMergein classPlotManager
-
startPlotUnlink
- Specified by:
startPlotUnlinkin classPlotManager
-
finishPlotMerge
Description copied from class:PlotManagerFinishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).- Specified by:
finishPlotMergein classPlotManager- Parameters:
plotIds- list of PlotIds to finish the merge forqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
falseif part if the merge failed, otherwisetrueif successful.
-
finishPlotUnlink
Description copied from class:PlotManagerFinished off an unlink by resetting the top wall block for unlinked plots- Specified by:
finishPlotUnlinkin classPlotManager- Parameters:
plotIds- list of PlotIds to reset the top wall block ofqueue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- success or not
-
regenerateAllPlotWalls
Description copied from class:PlotManagerSets all the blocks along all the plot walls to their correct state (claimed or unclaimed).- Overrides:
regenerateAllPlotWallsin classPlotManager- Parameters:
queue- NullableQueueCoordinator. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
trueif the wall blocks were successfully set
-