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 TypeMethodDescriptionboolean
claimPlot(@NonNull Plot plot, @Nullable QueueCoordinator queue)
boolean
clearPlot(@NonNull Plot plot, Runnable whenDone, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue)
boolean
createRoadEast(@NonNull Plot plot, @Nullable QueueCoordinator queue)
Create the road east of the plot (not schematic-based)boolean
createRoadSouth(@NonNull Plot plot, @Nullable QueueCoordinator queue)
Create the road south of the plot (not schematic-based)boolean
createRoadSouthEast(@NonNull Plot plot, @Nullable QueueCoordinator queue)
Create the south-east corner of the road (intersection, not schematic-based)boolean
finishPlotMerge(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue)
Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).boolean
finishPlotUnlink(@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.boolean
regenerateAllPlotWalls(@Nullable QueueCoordinator queue)
Sets all the blocks along all the plot walls to their correct state (claimed or unclaimed).boolean
removeRoadEast(@NonNull Plot plot, @Nullable QueueCoordinator queue)
Replace the road to the east of the plot with standard plot blocks (for when merging plots)boolean
removeRoadSouth(@NonNull Plot plot, @Nullable QueueCoordinator queue)
Replace the road to the south of the plot with standard plot blocks (for when merging plots)boolean
removeRoadSouthEast(@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)boolean
setComponent(@NonNull PlotId plotId, @NonNull String component, @NonNull com.sk89q.worldedit.function.pattern.Pattern blocks, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue)
Set the specified components to the specified Pattern on the specified plot.boolean
startPlotMerge(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue)
boolean
startPlotUnlink(@NonNull List<PlotId> plotIds, @Nullable QueueCoordinator queue)
boolean
unClaimPlot(@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:
getPlotIdAbs
in classPlotManager
-
getPlotId
- Specified by:
getPlotId
in classPlotManager
-
getPlotBottomLocAbs
- Specified by:
getPlotBottomLocAbs
in classPlotManager
-
getPlotTopLocAbs
- Specified by:
getPlotTopLocAbs
in classPlotManager
-
clearPlot
public boolean clearPlot(@NonNull Plot plot, Runnable whenDone, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue)- Specified by:
clearPlot
in classPlotManager
-
claimPlot
- Specified by:
claimPlot
in classPlotManager
-
unClaimPlot
public boolean unClaimPlot(@NonNull Plot plot, Runnable whenDone, @Nullable QueueCoordinator queue)Description copied from class:PlotManager
Completes block changes associated with plot unclaim.- Specified by:
unClaimPlot
in 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:PlotManager
Retrieves the location of where a sign should be for a plot.- Specified by:
getSignLoc
in classPlotManager
- Parameters:
plot
- The plot- Returns:
- The location where a sign should be
-
getPlotComponents
Description copied from class:PlotManager
Get an array of the plot's component values as string- Specified by:
getPlotComponents
in 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 com.sk89q.worldedit.function.pattern.Pattern blocks, @Nullable PlotPlayer<?> actor, @Nullable QueueCoordinator queue)Description copied from class:PlotManager
Set the specified components to the specified Pattern on the specified plot.- Specified by:
setComponent
in 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:PlotManager
Create the road east of the plot (not schematic-based)- Specified by:
createRoadEast
in 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:PlotManager
Create the road south of the plot (not schematic-based)- Specified by:
createRoadSouth
in 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:PlotManager
Create the south-east corner of the road (intersection, not schematic-based)- Specified by:
createRoadSouthEast
in 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:PlotManager
Replace the road to the east of the plot with standard plot blocks (for when merging plots)- Specified by:
removeRoadEast
in 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:PlotManager
Replace the road to the south of the plot with standard plot blocks (for when merging plots)- Specified by:
removeRoadSouth
in 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:PlotManager
Replace the road to the south east of the plot (intersection) with standard plot blocks (for when merging plots)- Specified by:
removeRoadSouthEast
in 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:
startPlotMerge
in classPlotManager
-
startPlotUnlink
- Specified by:
startPlotUnlink
in classPlotManager
-
finishPlotMerge
Description copied from class:PlotManager
Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).- Specified by:
finishPlotMerge
in 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:
- false if part if the merge failed, otherwise true if successful.
-
finishPlotUnlink
Description copied from class:PlotManager
Finished off an unlink by resetting the top wall block for unlinked plots- Specified by:
finishPlotUnlink
in 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:PlotManager
Sets all the blocks along all the plot walls to their correct state (claimed or unclaimed).- Overrides:
regenerateAllPlotWalls
in classPlotManager
- Parameters:
queue
- NullableQueueCoordinator
. If null, creates own queue and enqueues, otherwise writes to the queue but does not enqueue.- Returns:
- true if the wall blocks were successfully set
-