public class DefaultPlotManager extends PlotManager
| Constructor and Description |
|---|
DefaultPlotManager()
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearPlot(org.bukkit.World world,
Plot plot)
Clearing the plot needs to only consider removing the blocks - This
implementation has used the SetCuboid function, as it is fast, and uses
NMS code - It also makes use of the fact that deleting chunks is a lot
faster than block updates This code is very messy, but you don't need to
do something quite as complex unless you happen to have 512x512 sized
plots
|
boolean |
createRoadEast(PlotWorld plotworld,
Plot plot)
PLOT MERGING
|
boolean |
createRoadSouth(PlotWorld plotworld,
Plot plot)
|
boolean |
createRoadSouthEast(PlotWorld plotworld,
Plot plot)
|
boolean |
finishPlotMerge(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
Finishing off plot merging by adding in the walls surrounding the
plot
(OPTIONAL)(UNFINISHED)
|
boolean |
finishPlotUnlink(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
|
org.bukkit.Location |
getPlotBottomLocAbs(PlotWorld plotworld,
PlotId plotid)
Get the bottom plot loc (some basic math)
|
PlotId |
getPlotId(PlotWorld plotworld,
org.bukkit.Location loc)
Some complex stuff for traversing mega plots (return getPlotIdAbs if
you
do not support mega plots)
|
PlotId |
getPlotIdAbs(PlotWorld plotworld,
org.bukkit.Location loc)
Default implementation of getting a plot at a given location For a
simplified explanation of the math involved: - Get the current coords -
shift these numbers down to something relatable for a single plot
(similar to reducing trigonometric functions down to the first quadrant)
- e.g.
|
org.bukkit.Location |
getPlotTopLocAbs(PlotWorld plotworld,
PlotId plotid)
Get the top plot loc (some basic math)
|
org.bukkit.Location |
getSignLoc(org.bukkit.World world,
PlotWorld plotworld,
Plot plot)
Remove sign for a plot
|
boolean |
isInPlotAbs(PlotWorld plotworld,
org.bukkit.Location loc,
PlotId plotid)
Check if a location is inside a specific plot(non-Javadoc) - For this
implementation, we don't need to do anything fancier than referring to
getPlotIdAbs(...)
|
boolean |
removeRoadEast(PlotWorld plotworld,
Plot plot)
|
boolean |
removeRoadSouth(PlotWorld plotworld,
Plot plot)
|
boolean |
removeRoadSouthEast(PlotWorld plotworld,
Plot plot)
|
boolean |
setBiome(org.bukkit.World world,
Plot plot,
org.bukkit.block.Biome biome)
Set a plot biome
|
boolean |
setFloor(org.bukkit.World world,
PlotWorld plotworld,
PlotId plotid,
PlotBlock[] blocks)
|
boolean |
setWall(org.bukkit.World w,
PlotWorld plotworld,
PlotId plotid,
PlotBlock plotblock)
|
boolean |
setWallFilling(org.bukkit.World w,
PlotWorld plotworld,
PlotId plotid,
PlotBlock plotblock)
|
boolean |
startPlotMerge(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
|
boolean |
startPlotUnlink(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
|
public PlotId getPlotIdAbs(PlotWorld plotworld, org.bukkit.Location loc)
getPlotIdAbs in
class PlotManagerpublic PlotId getPlotId(PlotWorld plotworld, org.bukkit.Location loc)
getPlotId in
class PlotManagerpublic boolean isInPlotAbs(PlotWorld plotworld, org.bukkit.Location loc, PlotId plotid)
isInPlotAbs in
class PlotManagerpublic org.bukkit.Location getPlotBottomLocAbs(PlotWorld plotworld, PlotId plotid)
getPlotBottomLocAbs in
class PlotManagerpublic org.bukkit.Location getPlotTopLocAbs(PlotWorld plotworld, PlotId plotid)
getPlotTopLocAbs in
class PlotManagerpublic boolean clearPlot(org.bukkit.World world,
Plot plot)
clearPlot in
class PlotManagerpublic org.bukkit.Location getSignLoc(org.bukkit.World world,
PlotWorld plotworld,
Plot plot)
getSignLoc in
class PlotManagerpublic boolean setFloor(org.bukkit.World world,
PlotWorld plotworld,
PlotId plotid,
PlotBlock[] blocks)
setFloor in
class PlotManagerpublic boolean setWallFilling(org.bukkit.World w,
PlotWorld plotworld,
PlotId plotid,
PlotBlock plotblock)
setWallFilling in
class PlotManagerpublic boolean setWall(org.bukkit.World w,
PlotWorld plotworld,
PlotId plotid,
PlotBlock plotblock)
setWall in
class PlotManagerpublic boolean setBiome(org.bukkit.World world,
Plot plot,
org.bukkit.block.Biome biome)
setBiome in
class PlotManagerpublic boolean createRoadEast(PlotWorld plotworld, Plot plot)
createRoadEast in
class PlotManagerpublic boolean createRoadSouth(PlotWorld plotworld, Plot plot)
createRoadSouth in
class PlotManagerpublic boolean createRoadSouthEast(PlotWorld plotworld, Plot plot)
createRoadSouthEast in
class PlotManagerpublic boolean removeRoadEast(PlotWorld plotworld, Plot plot)
removeRoadEast in
class PlotManagerpublic boolean removeRoadSouth(PlotWorld plotworld, Plot plot)
removeRoadSouth in
class PlotManagerpublic boolean removeRoadSouthEast(PlotWorld plotworld, Plot plot)
removeRoadSouthEast in
class PlotManagerpublic boolean finishPlotMerge(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
finishPlotMerge in
class PlotManagerpublic boolean finishPlotUnlink(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
finishPlotUnlink in
class PlotManagerpublic boolean startPlotMerge(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
startPlotMerge in
class PlotManagerpublic boolean startPlotUnlink(org.bukkit.World world,
PlotWorld plotworld,
java.util.ArrayList<PlotId> plotIds)
startPlotUnlink in
class PlotManager