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 PlotManager
public PlotId getPlotId(PlotWorld plotworld, org.bukkit.Location loc)
getPlotId
in
class PlotManager
public boolean isInPlotAbs(PlotWorld plotworld, org.bukkit.Location loc, PlotId plotid)
isInPlotAbs
in
class PlotManager
public org.bukkit.Location getPlotBottomLocAbs(PlotWorld plotworld, PlotId plotid)
getPlotBottomLocAbs
in
class PlotManager
public org.bukkit.Location getPlotTopLocAbs(PlotWorld plotworld, PlotId plotid)
getPlotTopLocAbs
in
class PlotManager
public boolean clearPlot(org.bukkit.World world, Plot plot)
clearPlot
in
class PlotManager
public org.bukkit.Location getSignLoc(org.bukkit.World world, PlotWorld plotworld, Plot plot)
getSignLoc
in
class PlotManager
public boolean setFloor(org.bukkit.World world, PlotWorld plotworld, PlotId plotid, PlotBlock[] blocks)
setFloor
in
class PlotManager
public boolean setWallFilling(org.bukkit.World w, PlotWorld plotworld, PlotId plotid, PlotBlock plotblock)
setWallFilling
in
class PlotManager
public boolean setWall(org.bukkit.World w, PlotWorld plotworld, PlotId plotid, PlotBlock plotblock)
setWall
in
class PlotManager
public boolean setBiome(org.bukkit.World world, Plot plot, org.bukkit.block.Biome biome)
setBiome
in
class PlotManager
public boolean createRoadEast(PlotWorld plotworld, Plot plot)
createRoadEast
in
class PlotManager
public boolean createRoadSouth(PlotWorld plotworld, Plot plot)
createRoadSouth
in
class PlotManager
public boolean createRoadSouthEast(PlotWorld plotworld, Plot plot)
createRoadSouthEast
in
class PlotManager
public boolean removeRoadEast(PlotWorld plotworld, Plot plot)
removeRoadEast
in
class PlotManager
public boolean removeRoadSouth(PlotWorld plotworld, Plot plot)
removeRoadSouth
in
class PlotManager
public boolean removeRoadSouthEast(PlotWorld plotworld, Plot plot)
removeRoadSouthEast
in
class PlotManager
public boolean finishPlotMerge(org.bukkit.World world, PlotWorld plotworld, java.util.ArrayList<PlotId> plotIds)
finishPlotMerge
in
class PlotManager
public boolean finishPlotUnlink(org.bukkit.World world, PlotWorld plotworld, java.util.ArrayList<PlotId> plotIds)
finishPlotUnlink
in
class PlotManager
public boolean startPlotMerge(org.bukkit.World world, PlotWorld plotworld, java.util.ArrayList<PlotId> plotIds)
startPlotMerge
in
class PlotManager
public boolean startPlotUnlink(org.bukkit.World world, PlotWorld plotworld, java.util.ArrayList<PlotId> plotIds)
startPlotUnlink
in
class PlotManager