mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Remove PlotArea parameter from PlotManager method calls
As per the previous commit, all PlotManagers now have a reference to their managed PlotArea.
This commit is contained in:
parent
6b3960fc3f
commit
c5bca66618
@ -55,7 +55,7 @@ public class DebugClaimTest extends SubCommand {
|
|||||||
MainUtil.sendMessage(player, " - &cDB Already contains: " + plot.getId());
|
MainUtil.sendMessage(player, " - &cDB Already contains: " + plot.getId());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Location loc = manager.getSignLoc(area, plot);
|
Location loc = manager.getSignLoc(plot);
|
||||||
ChunkLoc chunk = new ChunkLoc(loc.getX() >> 4, loc.getZ() >> 4);
|
ChunkLoc chunk = new ChunkLoc(loc.getX() >> 4, loc.getZ() >> 4);
|
||||||
boolean result = ChunkManager.manager.loadChunk(area.worldname, chunk, false);
|
boolean result = ChunkManager.manager.loadChunk(area.worldname, chunk, false);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -2,11 +2,9 @@ package com.github.intellectualsites.plotsquared.plot.commands;
|
|||||||
|
|
||||||
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
|
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
|
||||||
import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
||||||
import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotManager;
|
|
||||||
import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotWorld;
|
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.Location;
|
import com.github.intellectualsites.plotsquared.plot.object.Location;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
|
import com.github.intellectualsites.plotsquared.plot.object.PlotManager;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||||
|
|
||||||
@ -18,20 +16,16 @@ public class DebugRoadRegen extends SubCommand {
|
|||||||
|
|
||||||
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
||||||
Location loc = player.getLocation();
|
Location loc = player.getLocation();
|
||||||
PlotArea plotArea = loc.getPlotArea();
|
PlotManager manager = loc.getPlotArea().getPlotManager();
|
||||||
if (!(plotArea instanceof HybridPlotWorld)) {
|
|
||||||
return sendMessage(player, Captions.NOT_IN_PLOT_WORLD);
|
|
||||||
}
|
|
||||||
Plot plot = player.getCurrentPlot();
|
Plot plot = player.getCurrentPlot();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
Captions.NOT_IN_PLOT.send(player);
|
Captions.NOT_IN_PLOT.send(player);
|
||||||
} else if (plot.isMerged()) {
|
} else if (plot.isMerged()) {
|
||||||
Captions.REQUIRES_UNMERGED.send(player);
|
Captions.REQUIRES_UNMERGED.send(player);
|
||||||
} else {
|
} else {
|
||||||
HybridPlotManager manager = (HybridPlotManager) plotArea.getPlotManager();
|
manager.createRoadEast(plot);
|
||||||
manager.createRoadEast(plotArea, plot);
|
manager.createRoadSouth(plot);
|
||||||
manager.createRoadSouth(plotArea, plot);
|
manager.createRoadSouthEast(plot);
|
||||||
manager.createRoadSouthEast(plotArea, plot);
|
|
||||||
MainUtil.sendMessage(player, "&6Regenerating plot south/east roads: " + plot.getId()
|
MainUtil.sendMessage(player, "&6Regenerating plot south/east roads: " + plot.getId()
|
||||||
+ "\n&6 - Result: &aSuccess");
|
+ "\n&6 - Result: &aSuccess");
|
||||||
MainUtil.sendMessage(player, "&cTo regenerate all roads: /plot regenallroads");
|
MainUtil.sendMessage(player, "&cTo regenerate all roads: /plot regenallroads");
|
||||||
|
@ -47,7 +47,7 @@ import java.util.stream.IntStream;
|
|||||||
@Override public boolean set(PlotPlayer player, final Plot plot, String value) {
|
@Override public boolean set(PlotPlayer player, final Plot plot, String value) {
|
||||||
PlotArea plotArea = player.getLocation().getPlotArea();
|
PlotArea plotArea = player.getLocation().getPlotArea();
|
||||||
PlotManager manager = player.getLocation().getPlotManager();
|
PlotManager manager = player.getLocation().getPlotManager();
|
||||||
String[] components = manager.getPlotComponents(plotArea, plot.getId());
|
String[] components = manager.getPlotComponents(plot.getId());
|
||||||
boolean allowUnsafe = DebugAllowUnsafe.unsafeAllowed.contains(player.getUUID());
|
boolean allowUnsafe = DebugAllowUnsafe.unsafeAllowed.contains(player.getUUID());
|
||||||
|
|
||||||
String[] args = value.split(" ");
|
String[] args = value.split(" ");
|
||||||
@ -124,7 +124,7 @@ import java.util.stream.IntStream;
|
|||||||
Plot plot = player.getCurrentPlot();
|
Plot plot = player.getCurrentPlot();
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
newValues.addAll(
|
newValues.addAll(
|
||||||
Arrays.asList(plot.getManager().getPlotComponents(plot.getArea(), plot.getId())));
|
Arrays.asList(plot.getManager().getPlotComponents(plot.getId())));
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringMan
|
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringMan
|
||||||
.join(newValues, Captions.BLOCK_LIST_SEPARATER.formatted()));
|
.join(newValues, Captions.BLOCK_LIST_SEPARATER.formatted()));
|
||||||
@ -151,7 +151,7 @@ import java.util.stream.IntStream;
|
|||||||
}
|
}
|
||||||
// components
|
// components
|
||||||
HashSet<String> components = new HashSet<>(
|
HashSet<String> components = new HashSet<>(
|
||||||
Arrays.asList(plot.getManager().getPlotComponents(plot.getArea(), plot.getId())));
|
Arrays.asList(plot.getManager().getPlotComponents(plot.getId())));
|
||||||
if (components.contains(args[0].toLowerCase())) {
|
if (components.contains(args[0].toLowerCase())) {
|
||||||
return this.component.onCommand(player, Arrays.copyOfRange(args, 0, args.length));
|
return this.component.onCommand(player, Arrays.copyOfRange(args, 0, args.length));
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ import java.util.zip.ZipOutputStream;
|
|||||||
final PlotManager manager = area.getPlotManager();
|
final PlotManager manager = area.getPlotManager();
|
||||||
TaskManager.runTaskAsync(() -> {
|
TaskManager.runTaskAsync(() -> {
|
||||||
try {
|
try {
|
||||||
manager.exportTemplate(area);
|
manager.exportTemplate();
|
||||||
} catch (Exception e) { // Must recover from any exception thrown a third party template manager
|
} catch (Exception e) { // Must recover from any exception thrown a third party template manager
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
MainUtil.sendMessage(player, "Failed: " + e.getMessage());
|
MainUtil.sendMessage(player, "Failed: " + e.getMessage());
|
||||||
|
@ -96,7 +96,7 @@ public class AugmentedUtils {
|
|||||||
for (int z = bzz; z <= tzz; z++) {
|
for (int z = bzz; z <= tzz; z++) {
|
||||||
int rx = x + blockX;
|
int rx = x + blockX;
|
||||||
int rz = z + blockZ;
|
int rz = z + blockZ;
|
||||||
boolean can = manager.getPlotId(area, rx, 0, rz) == null;
|
boolean can = manager.getPlotId(rx, 0, rz) == null;
|
||||||
if (can) {
|
if (can) {
|
||||||
for (int y = 1; y < 128; y++) {
|
for (int y = 1; y < 128; y++) {
|
||||||
queue.setBlock(rx, y, rz, air);
|
queue.setBlock(rx, y, rz, air);
|
||||||
|
@ -24,55 +24,53 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean setComponent(PlotArea plotArea, PlotId plotId, String component,
|
@Override public boolean setComponent(PlotId plotId, String component,
|
||||||
BlockBucket blocks) {
|
BlockBucket blocks) {
|
||||||
switch (component) {
|
switch (component) {
|
||||||
case "floor":
|
case "floor":
|
||||||
setFloor(plotArea, plotId, blocks);
|
setFloor(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "wall":
|
case "wall":
|
||||||
setWallFilling(plotArea, plotId, blocks);
|
setWallFilling(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "all":
|
case "all":
|
||||||
setAll(plotArea, plotId, blocks);
|
setAll(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "air":
|
case "air":
|
||||||
setAir(plotArea, plotId, blocks);
|
setAir(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "main":
|
case "main":
|
||||||
setMain(plotArea, plotId, blocks);
|
setMain(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "middle":
|
case "middle":
|
||||||
setMiddle(plotArea, plotId, blocks);
|
setMiddle(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "outline":
|
case "outline":
|
||||||
setOutline(plotArea, plotId, blocks);
|
setOutline(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
case "border":
|
case "border":
|
||||||
setWall(plotArea, plotId, blocks);
|
setWall(plotId, blocks);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean unClaimPlot(PlotArea plotArea, Plot plot, Runnable whenDone) {
|
@Override public boolean unClaimPlot(Plot plot, Runnable whenDone) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
setWallFilling(plot.getId(), classicPlotWorld.WALL_FILLING);
|
||||||
setWallFilling(dpw, plot.getId(), dpw.WALL_FILLING);
|
setWall(plot.getId(), classicPlotWorld.WALL_BLOCK);
|
||||||
setWall(dpw, plot.getId(), dpw.WALL_BLOCK);
|
|
||||||
GlobalBlockQueue.IMP.addTask(whenDone);
|
GlobalBlockQueue.IMP.addTask(whenDone);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setFloor(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setFloor(PlotId plotId, BlockBucket blocks) {
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
if (plot.isBasePlot()) {
|
if (plot.isBasePlot()) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
|
||||||
for (RegionWrapper region : plot.getRegions()) {
|
for (RegionWrapper region : plot.getRegions()) {
|
||||||
Location pos1 =
|
Location pos1 =
|
||||||
new Location(plotArea.worldname, region.minX, dpw.PLOT_HEIGHT, region.minZ);
|
new Location(classicPlotWorld.worldname, region.minX, classicPlotWorld.PLOT_HEIGHT, region.minZ);
|
||||||
Location pos2 =
|
Location pos2 =
|
||||||
new Location(plotArea.worldname, region.maxX, dpw.PLOT_HEIGHT, region.maxZ);
|
new Location(classicPlotWorld.worldname, region.maxX, classicPlotWorld.PLOT_HEIGHT, region.maxZ);
|
||||||
queue.setCuboid(pos1, pos2, blocks);
|
queue.setCuboid(pos1, pos2, blocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,87 +78,83 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setAll(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setAll(PlotId plotId, BlockBucket blocks) {
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
if (!plot.isBasePlot()) {
|
if (!plot.isBasePlot()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
int maxY = plotArea.getPlotManager().getWorldHeight();
|
int maxY = getWorldHeight();
|
||||||
for (RegionWrapper region : plot.getRegions()) {
|
for (RegionWrapper region : plot.getRegions()) {
|
||||||
Location pos1 = new Location(plotArea.worldname, region.minX, 1, region.minZ);
|
Location pos1 = new Location(classicPlotWorld.worldname, region.minX, 1, region.minZ);
|
||||||
Location pos2 = new Location(plotArea.worldname, region.maxX, maxY, region.maxZ);
|
Location pos2 = new Location(classicPlotWorld.worldname, region.maxX, maxY, region.maxZ);
|
||||||
queue.setCuboid(pos1, pos2, blocks);
|
queue.setCuboid(pos1, pos2, blocks);
|
||||||
}
|
}
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setAir(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setAir(PlotId plotId, BlockBucket blocks) {
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
if (!plot.isBasePlot()) {
|
if (!plot.isBasePlot()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
int maxY = getWorldHeight();
|
||||||
int maxY = plotArea.getPlotManager().getWorldHeight();
|
|
||||||
for (RegionWrapper region : plot.getRegions()) {
|
for (RegionWrapper region : plot.getRegions()) {
|
||||||
Location pos1 =
|
Location pos1 =
|
||||||
new Location(plotArea.worldname, region.minX, dpw.PLOT_HEIGHT + 1, region.minZ);
|
new Location(classicPlotWorld.worldname, region.minX, classicPlotWorld.PLOT_HEIGHT + 1, region.minZ);
|
||||||
Location pos2 = new Location(plotArea.worldname, region.maxX, maxY, region.maxZ);
|
Location pos2 = new Location(classicPlotWorld.worldname, region.maxX, maxY, region.maxZ);
|
||||||
queue.setCuboid(pos1, pos2, blocks);
|
queue.setCuboid(pos1, pos2, blocks);
|
||||||
}
|
}
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setMain(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setMain(PlotId plotId, BlockBucket blocks) {
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
if (!plot.isBasePlot()) {
|
if (!plot.isBasePlot()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
|
||||||
for (RegionWrapper region : plot.getRegions()) {
|
for (RegionWrapper region : plot.getRegions()) {
|
||||||
Location pos1 = new Location(plotArea.worldname, region.minX, 1, region.minZ);
|
Location pos1 = new Location(classicPlotWorld.worldname, region.minX, 1, region.minZ);
|
||||||
Location pos2 =
|
Location pos2 =
|
||||||
new Location(plotArea.worldname, region.maxX, dpw.PLOT_HEIGHT - 1, region.maxZ);
|
new Location(classicPlotWorld.worldname, region.maxX, classicPlotWorld.PLOT_HEIGHT - 1, region.maxZ);
|
||||||
queue.setCuboid(pos1, pos2, blocks);
|
queue.setCuboid(pos1, pos2, blocks);
|
||||||
}
|
}
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setMiddle(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setMiddle(PlotId plotId, BlockBucket blocks) {
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
if (!plot.isBasePlot()) {
|
if (!plot.isBasePlot()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Location[] corners = plot.getCorners();
|
Location[] corners = plot.getCorners();
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
|
||||||
|
|
||||||
int x = MathMan.average(corners[0].getX(), corners[1].getX());
|
int x = MathMan.average(corners[0].getX(), corners[1].getX());
|
||||||
int z = MathMan.average(corners[0].getZ(), corners[1].getZ());
|
int z = MathMan.average(corners[0].getZ(), corners[1].getZ());
|
||||||
queue.setBlock(x, dpw.PLOT_HEIGHT, z, blocks.getBlock());
|
queue.setBlock(x, classicPlotWorld.PLOT_HEIGHT, z, blocks.getBlock());
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setOutline(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setOutline(PlotId plotId, BlockBucket blocks) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
if (classicPlotWorld.ROAD_WIDTH == 0) {
|
||||||
if (dpw.ROAD_WIDTH == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
Location bottom = plot.getBottomAbs();
|
Location bottom = plot.getBottomAbs();
|
||||||
Location top = plot.getExtendedTopAbs();
|
Location top = plot.getExtendedTopAbs();
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
int maxY = plotArea.getPlotManager().getWorldHeight();
|
int maxY = classicPlotWorld.getPlotManager().getWorldHeight();
|
||||||
if (!plot.getMerged(Direction.NORTH)) {
|
if (!plot.getMerged(Direction.NORTH)) {
|
||||||
int z = bottom.getZ();
|
int z = bottom.getZ();
|
||||||
for (int x = bottom.getX(); x <= top.getX(); x++) {
|
for (int x = bottom.getX(); x <= top.getX(); x++) {
|
||||||
for (int y = dpw.PLOT_HEIGHT; y <= maxY; y++) {
|
for (int y = classicPlotWorld.PLOT_HEIGHT; y <= maxY; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,7 +162,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
if (!plot.getMerged(Direction.WEST)) {
|
if (!plot.getMerged(Direction.WEST)) {
|
||||||
int x = bottom.getX();
|
int x = bottom.getX();
|
||||||
for (int z = bottom.getZ(); z <= top.getZ(); z++) {
|
for (int z = bottom.getZ(); z <= top.getZ(); z++) {
|
||||||
for (int y = dpw.PLOT_HEIGHT; y <= maxY; y++) {
|
for (int y = classicPlotWorld.PLOT_HEIGHT; y <= maxY; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +171,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
if (!plot.getMerged(Direction.SOUTH)) {
|
if (!plot.getMerged(Direction.SOUTH)) {
|
||||||
int z = top.getZ();
|
int z = top.getZ();
|
||||||
for (int x = bottom.getX(); x <= top.getX(); x++) {
|
for (int x = bottom.getX(); x <= top.getX(); x++) {
|
||||||
for (int y = dpw.PLOT_HEIGHT; y <= maxY; y++) {
|
for (int y = classicPlotWorld.PLOT_HEIGHT; y <= maxY; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,15 +179,15 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
if (!plot.getMerged(Direction.EAST)) {
|
if (!plot.getMerged(Direction.EAST)) {
|
||||||
int x = top.getX();
|
int x = top.getX();
|
||||||
for (int z = bottom.getZ(); z <= top.getZ(); z++) {
|
for (int z = bottom.getZ(); z <= top.getZ(); z++) {
|
||||||
for (int y = dpw.PLOT_HEIGHT; y <= maxY; y++) {
|
for (int y = classicPlotWorld.PLOT_HEIGHT; y <= maxY; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (plot.isBasePlot()) {
|
if (plot.isBasePlot()) {
|
||||||
for (RegionWrapper region : plot.getRegions()) {
|
for (RegionWrapper region : plot.getRegions()) {
|
||||||
Location pos1 = new Location(plotArea.worldname, region.minX, maxY, region.minZ);
|
Location pos1 = new Location(classicPlotWorld.worldname, region.minX, maxY, region.minZ);
|
||||||
Location pos2 = new Location(plotArea.worldname, region.maxX, maxY, region.maxZ);
|
Location pos2 = new Location(classicPlotWorld.worldname, region.maxX, maxY, region.maxZ);
|
||||||
queue.setCuboid(pos1, pos2, blocks);
|
queue.setCuboid(pos1, pos2, blocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,21 +195,20 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setWallFilling(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setWallFilling(PlotId plotId, BlockBucket blocks) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
if (classicPlotWorld.ROAD_WIDTH == 0) {
|
||||||
if (dpw.ROAD_WIDTH == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
Location bot = plot.getExtendedBottomAbs()
|
Location bot = plot.getExtendedBottomAbs()
|
||||||
.subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0,
|
.subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0,
|
||||||
plot.getMerged(Direction.NORTH) ? 0 : 1);
|
plot.getMerged(Direction.NORTH) ? 0 : 1);
|
||||||
Location top = plot.getExtendedTopAbs().add(1, 0, 1);
|
Location top = plot.getExtendedTopAbs().add(1, 0, 1);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
if (!plot.getMerged(Direction.NORTH)) {
|
if (!plot.getMerged(Direction.NORTH)) {
|
||||||
int z = bot.getZ();
|
int z = bot.getZ();
|
||||||
for (int x = bot.getX(); x < top.getX(); x++) {
|
for (int x = bot.getX(); x < top.getX(); x++) {
|
||||||
for (int y = 1; y <= dpw.WALL_HEIGHT; y++) {
|
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,7 +216,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
if (!plot.getMerged(Direction.WEST)) {
|
if (!plot.getMerged(Direction.WEST)) {
|
||||||
int x = bot.getX();
|
int x = bot.getX();
|
||||||
for (int z = bot.getZ(); z < top.getZ(); z++) {
|
for (int z = bot.getZ(); z < top.getZ(); z++) {
|
||||||
for (int y = 1; y <= dpw.WALL_HEIGHT; y++) {
|
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,7 +225,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
int z = top.getZ();
|
int z = top.getZ();
|
||||||
for (int x = bot.getX();
|
for (int x = bot.getX();
|
||||||
x < top.getX() + (plot.getMerged(Direction.EAST) ? 0 : 1); x++) {
|
x < top.getX() + (plot.getMerged(Direction.EAST) ? 0 : 1); x++) {
|
||||||
for (int y = 1; y <= dpw.WALL_HEIGHT; y++) {
|
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,7 +234,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
int x = top.getX();
|
int x = top.getX();
|
||||||
for (int z = bot.getZ();
|
for (int z = bot.getZ();
|
||||||
z < top.getZ() + (plot.getMerged(Direction.SOUTH) ? 0 : 1); z++) {
|
z < top.getZ() + (plot.getMerged(Direction.SOUTH) ? 0 : 1); z++) {
|
||||||
for (int y = 1; y <= dpw.WALL_HEIGHT; y++) {
|
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
|
||||||
queue.setBlock(x, y, z, blocks.getBlock());
|
queue.setBlock(x, y, z, blocks.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,18 +243,17 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setWall(PlotArea plotArea, PlotId plotId, BlockBucket blocks) {
|
public boolean setWall(PlotId plotId, BlockBucket blocks) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
if (classicPlotWorld.ROAD_WIDTH == 0) {
|
||||||
if (dpw.ROAD_WIDTH == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Plot plot = plotArea.getPlotAbs(plotId);
|
Plot plot = classicPlotWorld.getPlotAbs(plotId);
|
||||||
Location bot = plot.getExtendedBottomAbs()
|
Location bot = plot.getExtendedBottomAbs()
|
||||||
.subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0,
|
.subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0,
|
||||||
plot.getMerged(Direction.NORTH) ? 0 : 1);
|
plot.getMerged(Direction.NORTH) ? 0 : 1);
|
||||||
Location top = plot.getExtendedTopAbs().add(1, 0, 1);
|
Location top = plot.getExtendedTopAbs().add(1, 0, 1);
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
int y = dpw.WALL_HEIGHT + 1;
|
int y = classicPlotWorld.WALL_HEIGHT + 1;
|
||||||
if (!plot.getMerged(Direction.NORTH)) {
|
if (!plot.getMerged(Direction.NORTH)) {
|
||||||
int z = bot.getZ();
|
int z = bot.getZ();
|
||||||
for (int x = bot.getX(); x < top.getX(); x++) {
|
for (int x = bot.getX(); x < top.getX(); x++) {
|
||||||
@ -295,145 +287,139 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
/**
|
/**
|
||||||
* PLOT MERGING.
|
* PLOT MERGING.
|
||||||
*/
|
*/
|
||||||
@Override public boolean createRoadEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadEast(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location pos1 = getPlotBottomLocAbs(plot.getId());
|
||||||
Location pos1 = getPlotBottomLocAbs(plotArea, plot.getId());
|
Location pos2 = getPlotTopLocAbs(plot.getId());
|
||||||
Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());
|
|
||||||
int sx = pos2.getX() + 1;
|
int sx = pos2.getX() + 1;
|
||||||
int ex = sx + dpw.ROAD_WIDTH - 1;
|
int ex = sx + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sz = pos1.getZ() - 2;
|
int sz = pos1.getZ() - 2;
|
||||||
int ez = pos2.getZ() + 2;
|
int ez = pos2.getZ() + 2;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
int maxY = plotArea.getPlotManager().getWorldHeight();
|
int maxY = getWorldHeight();
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
new Location(plotArea.worldname, sx, Math.min(dpw.WALL_HEIGHT, dpw.ROAD_HEIGHT) + 1,
|
new Location(classicPlotWorld.worldname, sx, Math.min(classicPlotWorld.WALL_HEIGHT, classicPlotWorld.ROAD_HEIGHT) + 1,
|
||||||
sz + 1), new Location(plotArea.worldname, ex, maxY, ez - 1),
|
sz + 1), new Location(classicPlotWorld.worldname, ex, maxY, ez - 1),
|
||||||
PlotBlock.get((short) 0, (byte) 0));
|
PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, 0, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, 0, sz + 1),
|
||||||
new Location(plotArea.worldname, ex, 0, ez - 1), PlotBlock.get((short) 7, (byte) 0));
|
new Location(classicPlotWorld.worldname, ex, 0, ez - 1), PlotBlock.get((short) 7, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT, ez - 1), dpw.WALL_FILLING);
|
new Location(classicPlotWorld.worldname, sx, classicPlotWorld.WALL_HEIGHT, ez - 1), classicPlotWorld.WALL_FILLING);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT + 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, classicPlotWorld.WALL_HEIGHT + 1, sz + 1),
|
||||||
new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT + 1, ez - 1), dpw.WALL_BLOCK);
|
new Location(classicPlotWorld.worldname, sx, classicPlotWorld.WALL_HEIGHT + 1, ez - 1), classicPlotWorld.WALL_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, ex, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, ex, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT, ez - 1), dpw.WALL_FILLING);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.WALL_HEIGHT, ez - 1), classicPlotWorld.WALL_FILLING);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT + 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, ex, classicPlotWorld.WALL_HEIGHT + 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT + 1, ez - 1), dpw.WALL_BLOCK);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.WALL_HEIGHT + 1, ez - 1), classicPlotWorld.WALL_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.ROAD_HEIGHT, ez - 1), dpw.ROAD_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), classicPlotWorld.ROAD_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouth(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouth(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location pos1 = getPlotBottomLocAbs(plot.getId());
|
||||||
Location pos1 = getPlotBottomLocAbs(plotArea, plot.getId());
|
Location pos2 = getPlotTopLocAbs(plot.getId());
|
||||||
Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());
|
|
||||||
int sz = pos2.getZ() + 1;
|
int sz = pos2.getZ() + 1;
|
||||||
int ez = sz + dpw.ROAD_WIDTH - 1;
|
int ez = sz + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sx = pos1.getX() - 2;
|
int sx = pos1.getX() - 2;
|
||||||
int ex = pos2.getX() + 2;
|
int ex = pos2.getX() + 2;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
new Location(plotArea.worldname, sx + 1, Math.min(dpw.WALL_HEIGHT, dpw.ROAD_HEIGHT) + 1,
|
new Location(classicPlotWorld.worldname, sx + 1, Math.min(classicPlotWorld.WALL_HEIGHT, classicPlotWorld.ROAD_HEIGHT) + 1,
|
||||||
sz),
|
sz),
|
||||||
new Location(plotArea.worldname, ex - 1, plotArea.getPlotManager().getWorldHeight(),
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.getPlotManager().getWorldHeight(),
|
||||||
ez), PlotBlock.get((short) 0, (byte) 0));
|
ez), PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 0, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 0, sz),
|
||||||
new Location(plotArea.worldname, ex - 1, 0, ez), PlotBlock.get((short) 7, (byte) 0));
|
new Location(classicPlotWorld.worldname, ex - 1, 0, ez), PlotBlock.get((short) 7, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, sz),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.WALL_HEIGHT, sz), dpw.WALL_FILLING);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.WALL_HEIGHT, sz), classicPlotWorld.WALL_FILLING);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, dpw.WALL_HEIGHT + 1, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, classicPlotWorld.WALL_HEIGHT + 1, sz),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.WALL_HEIGHT + 1, sz), dpw.WALL_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.WALL_HEIGHT + 1, sz), classicPlotWorld.WALL_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, ez),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, ez),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.WALL_HEIGHT, ez), dpw.WALL_FILLING);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.WALL_HEIGHT, ez), classicPlotWorld.WALL_FILLING);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, dpw.WALL_HEIGHT + 1, ez),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, classicPlotWorld.WALL_HEIGHT + 1, ez),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.WALL_HEIGHT + 1, ez), dpw.WALL_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.WALL_HEIGHT + 1, ez), classicPlotWorld.WALL_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.ROAD_HEIGHT, ez - 1), dpw.ROAD_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), classicPlotWorld.ROAD_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouthEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouthEast(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location pos2 = getPlotTopLocAbs(plot.getId());
|
||||||
Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());
|
|
||||||
int sx = pos2.getX() + 1;
|
int sx = pos2.getX() + 1;
|
||||||
int ex = sx + dpw.ROAD_WIDTH - 1;
|
int ex = sx + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sz = pos2.getZ() + 1;
|
int sz = pos2.getZ() + 1;
|
||||||
int ez = sz + dpw.ROAD_WIDTH - 1;
|
int ez = sz + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, dpw.ROAD_HEIGHT + 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, classicPlotWorld.ROAD_HEIGHT + 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.getPlotManager().getWorldHeight(), ez - 1),
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.getPlotManager().getWorldHeight(), ez - 1),
|
||||||
PlotBlock.get((short) 0, (byte) 0));
|
PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 0, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 0, sz + 1),
|
||||||
new Location(plotArea.worldname, ex - 1, 0, ez - 1),
|
new Location(classicPlotWorld.worldname, ex - 1, 0, ez - 1),
|
||||||
PlotBlock.get((short) 7, (byte) 0));
|
PlotBlock.get((short) 7, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.ROAD_HEIGHT, ez - 1), dpw.ROAD_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), classicPlotWorld.ROAD_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadEast(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location pos1 = getPlotBottomLocAbs(plot.getId());
|
||||||
Location pos1 = getPlotBottomLocAbs(plotArea, plot.getId());
|
Location pos2 = getPlotTopLocAbs(plot.getId());
|
||||||
Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());
|
|
||||||
int sx = pos2.getX() + 1;
|
int sx = pos2.getX() + 1;
|
||||||
int ex = sx + dpw.ROAD_WIDTH - 1;
|
int ex = sx + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sz = pos1.getZ() - 1;
|
int sz = pos1.getZ() - 1;
|
||||||
int ez = pos2.getZ() + 1;
|
int ez = pos2.getZ() + 1;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
new Location(plotArea.worldname, sx, Math.min(dpw.PLOT_HEIGHT, dpw.ROAD_HEIGHT) + 1,
|
new Location(classicPlotWorld.worldname, sx, Math.min(classicPlotWorld.PLOT_HEIGHT, classicPlotWorld.ROAD_HEIGHT) + 1,
|
||||||
sz),
|
sz),
|
||||||
new Location(plotArea.worldname, ex, plotArea.getPlotManager().getWorldHeight(), ez),
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.getPlotManager().getWorldHeight(), ez),
|
||||||
PlotBlock.get((short) 0, (byte) 0));
|
PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, 1, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, 1, sz + 1),
|
||||||
new Location(plotArea.worldname, ex, dpw.PLOT_HEIGHT - 1, ez - 1), dpw.MAIN_BLOCK);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.PLOT_HEIGHT - 1, ez - 1), classicPlotWorld.MAIN_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, dpw.PLOT_HEIGHT, sz + 1),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, classicPlotWorld.PLOT_HEIGHT, sz + 1),
|
||||||
new Location(plotArea.worldname, ex, dpw.PLOT_HEIGHT, ez - 1), dpw.TOP_BLOCK);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.PLOT_HEIGHT, ez - 1), classicPlotWorld.TOP_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadSouth(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadSouth(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location pos1 = getPlotBottomLocAbs(plot.getId());
|
||||||
Location pos1 = getPlotBottomLocAbs(plotArea, plot.getId());
|
Location pos2 = getPlotTopLocAbs(plot.getId());
|
||||||
Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());
|
|
||||||
int sz = pos2.getZ() + 1;
|
int sz = pos2.getZ() + 1;
|
||||||
int ez = sz + dpw.ROAD_WIDTH - 1;
|
int ez = sz + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sx = pos1.getX() - 1;
|
int sx = pos1.getX() - 1;
|
||||||
int ex = pos2.getX() + 1;
|
int ex = pos2.getX() + 1;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
new Location(plotArea.worldname, sx, Math.min(dpw.PLOT_HEIGHT, dpw.ROAD_HEIGHT) + 1,
|
new Location(classicPlotWorld.worldname, sx, Math.min(classicPlotWorld.PLOT_HEIGHT, classicPlotWorld.ROAD_HEIGHT) + 1,
|
||||||
sz),
|
sz),
|
||||||
new Location(plotArea.worldname, ex, plotArea.getPlotManager().getWorldHeight(), ez),
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.getPlotManager().getWorldHeight(), ez),
|
||||||
PlotBlock.get((short) 0, (byte) 0));
|
PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, 1, sz),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.PLOT_HEIGHT - 1, ez), dpw.MAIN_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.PLOT_HEIGHT - 1, ez), classicPlotWorld.MAIN_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx + 1, dpw.PLOT_HEIGHT, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx + 1, classicPlotWorld.PLOT_HEIGHT, sz),
|
||||||
new Location(plotArea.worldname, ex - 1, dpw.PLOT_HEIGHT, ez), dpw.TOP_BLOCK);
|
new Location(classicPlotWorld.worldname, ex - 1, classicPlotWorld.PLOT_HEIGHT, ez), classicPlotWorld.TOP_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadSouthEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadSouthEast(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
Location location = getPlotTopLocAbs(plot.getId());
|
||||||
Location location = getPlotTopLocAbs(dpw, plot.getId());
|
|
||||||
int sx = location.getX() + 1;
|
int sx = location.getX() + 1;
|
||||||
int ex = sx + dpw.ROAD_WIDTH - 1;
|
int ex = sx + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
int sz = location.getZ() + 1;
|
int sz = location.getZ() + 1;
|
||||||
int ez = sz + dpw.ROAD_WIDTH - 1;
|
int ez = sz + classicPlotWorld.ROAD_WIDTH - 1;
|
||||||
LocalBlockQueue queue = plotArea.getQueue(false);
|
LocalBlockQueue queue = classicPlotWorld.getQueue(false);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, dpw.ROAD_HEIGHT + 1, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, classicPlotWorld.ROAD_HEIGHT + 1, sz),
|
||||||
new Location(plotArea.worldname, ex, plotArea.getPlotManager().getWorldHeight(), ez),
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.getPlotManager().getWorldHeight(), ez),
|
||||||
PlotBlock.get((short) 0, (byte) 0));
|
PlotBlock.get((short) 0, (byte) 0));
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, 1, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, 1, sz),
|
||||||
new Location(plotArea.worldname, ex, dpw.ROAD_HEIGHT - 1, ez), dpw.MAIN_BLOCK);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.ROAD_HEIGHT - 1, ez), classicPlotWorld.MAIN_BLOCK);
|
||||||
queue.setCuboid(new Location(plotArea.worldname, sx, dpw.ROAD_HEIGHT, sz),
|
queue.setCuboid(new Location(classicPlotWorld.worldname, sx, classicPlotWorld.ROAD_HEIGHT, sz),
|
||||||
new Location(plotArea.worldname, ex, dpw.ROAD_HEIGHT, ez), dpw.TOP_BLOCK);
|
new Location(classicPlotWorld.worldname, ex, classicPlotWorld.ROAD_HEIGHT, ez), classicPlotWorld.TOP_BLOCK);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -441,48 +427,47 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
/**
|
/**
|
||||||
* Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).
|
* Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED).
|
||||||
*/
|
*/
|
||||||
@Override public boolean finishPlotMerge(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean finishPlotMerge(List<PlotId> plotIds) {
|
||||||
final BlockBucket block = ((ClassicPlotWorld) plotArea).CLAIMED_WALL_BLOCK;
|
final BlockBucket block = classicPlotWorld.CLAIMED_WALL_BLOCK;
|
||||||
plotIds.forEach(id -> setWall(plotArea, id, block));
|
plotIds.forEach(id -> setWall(id, block));
|
||||||
if (Settings.General.MERGE_REPLACE_WALL) {
|
if (Settings.General.MERGE_REPLACE_WALL) {
|
||||||
final BlockBucket wallBlock = ((ClassicPlotWorld) plotArea).WALL_FILLING;
|
final BlockBucket wallBlock = classicPlotWorld.WALL_FILLING;
|
||||||
plotIds.forEach(id -> setWallFilling(plotArea, id, wallBlock));
|
plotIds.forEach(id -> setWallFilling(id, wallBlock));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean finishPlotUnlink(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean finishPlotUnlink(List<PlotId> plotIds) {
|
||||||
final BlockBucket block = ((ClassicPlotWorld) plotArea).CLAIMED_WALL_BLOCK;
|
final BlockBucket block = classicPlotWorld.CLAIMED_WALL_BLOCK;
|
||||||
plotIds.forEach(id -> setWall(plotArea, id, block));
|
plotIds.forEach(id -> setWall(id, block));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean startPlotMerge(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean startPlotMerge(List<PlotId> plotIds) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean startPlotUnlink(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean startPlotUnlink(List<PlotId> plotIds) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean claimPlot(PlotArea plotArea, Plot plot) {
|
@Override public boolean claimPlot(Plot plot) {
|
||||||
final BlockBucket claim = ((ClassicPlotWorld) plotArea).CLAIMED_WALL_BLOCK;
|
final BlockBucket claim = classicPlotWorld.CLAIMED_WALL_BLOCK;
|
||||||
setWall(plotArea, plot.getId(), claim);
|
setWall(plot.getId(), claim);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String[] getPlotComponents(PlotArea plotArea, PlotId plotId) {
|
@Override public String[] getPlotComponents(PlotId plotId) {
|
||||||
return new String[] {"main", "floor", "air", "all", "border", "wall", "outline", "middle"};
|
return new String[] {"main", "floor", "air", "all", "border", "wall", "outline", "middle"};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove sign for a plot.
|
* Remove sign for a plot.
|
||||||
*/
|
*/
|
||||||
@Override public Location getSignLoc(PlotArea plotArea, Plot plot) {
|
@Override public Location getSignLoc(Plot plot) {
|
||||||
ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;
|
|
||||||
plot = plot.getBasePlot(false);
|
plot = plot.getBasePlot(false);
|
||||||
Location bot = plot.getBottomAbs();
|
Location bot = plot.getBottomAbs();
|
||||||
return new Location(plotArea.worldname, bot.getX() - 1, dpw.ROAD_HEIGHT + 1,
|
return new Location(classicPlotWorld.worldname, bot.getX() - 1, classicPlotWorld.ROAD_HEIGHT + 1,
|
||||||
bot.getZ() - 2);
|
bot.getZ() - 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,11 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void exportTemplate(PlotArea plotArea) throws IOException {
|
@Override public void exportTemplate() throws IOException {
|
||||||
HashSet<FileBytes> files = Sets.newHashSet(
|
HashSet<FileBytes> files = Sets.newHashSet(
|
||||||
new FileBytes(Settings.Paths.TEMPLATES + "/tmp-data.yml", Template.getBytes(plotArea)));
|
new FileBytes(Settings.Paths.TEMPLATES + "/tmp-data.yml", Template.getBytes(hybridPlotWorld)));
|
||||||
String dir = "schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator
|
String dir = "schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator
|
||||||
+ plotArea.worldname + File.separator;
|
+ hybridPlotWorld.worldname + File.separator;
|
||||||
try {
|
try {
|
||||||
File sideroad =
|
File sideroad =
|
||||||
MainUtil.getFile(PlotSquared.get().IMP.getDirectory(), dir + "sideroad.schem");
|
MainUtil.getFile(PlotSquared.get().IMP.getDirectory(), dir + "sideroad.schem");
|
||||||
@ -59,51 +59,50 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
Template.zipAll(plotArea.worldname, files);
|
Template.zipAll(hybridPlotWorld.worldname, files);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadEast(Plot plot) {
|
||||||
super.createRoadEast(plotArea, plot);
|
super.createRoadEast(plot);
|
||||||
HybridPlotWorld hpw = (HybridPlotWorld) plotArea;
|
|
||||||
PlotId id = plot.getId();
|
PlotId id = plot.getId();
|
||||||
PlotId id2 = new PlotId(id.x + 1, id.y);
|
PlotId id2 = new PlotId(id.x + 1, id.y);
|
||||||
Location bot = getPlotBottomLocAbs(hpw, id2);
|
Location bot = getPlotBottomLocAbs(id2);
|
||||||
Location top = getPlotTopLocAbs(hpw, id);
|
Location top = getPlotTopLocAbs(id);
|
||||||
Location pos1 = new Location(plotArea.worldname, top.getX() + 1, 0, bot.getZ() - 1);
|
Location pos1 = new Location(hybridPlotWorld.worldname, top.getX() + 1, 0, bot.getZ() - 1);
|
||||||
Location pos2 =
|
Location pos2 =
|
||||||
new Location(plotArea.worldname, bot.getX(), Math.min(getWorldHeight(), 255),
|
new Location(hybridPlotWorld.worldname, bot.getX(), Math.min(getWorldHeight(), 255),
|
||||||
top.getZ() + 1);
|
top.getZ() + 1);
|
||||||
MainUtil.resetBiome(plotArea, pos1, pos2);
|
MainUtil.resetBiome(hybridPlotWorld, pos1, pos2);
|
||||||
if (!hpw.ROAD_SCHEMATIC_ENABLED) {
|
if (!hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LocalBlockQueue queue = hpw.getQueue(false);
|
LocalBlockQueue queue = hybridPlotWorld.getQueue(false);
|
||||||
createSchemAbs(hpw, queue, pos1, pos2);
|
createSchemAbs(queue, pos1, pos2);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createSchemAbs(HybridPlotWorld hpw, LocalBlockQueue queue, Location pos1,
|
private void createSchemAbs(LocalBlockQueue queue, Location pos1,
|
||||||
Location pos2) {
|
Location pos2) {
|
||||||
int size = hpw.SIZE;
|
int size = hybridPlotWorld.SIZE;
|
||||||
int minY;
|
int minY;
|
||||||
if (Settings.Schematics.PASTE_ON_TOP) {
|
if (Settings.Schematics.PASTE_ON_TOP) {
|
||||||
minY = hpw.SCHEM_Y;
|
minY = hybridPlotWorld.SCHEM_Y;
|
||||||
} else {
|
} else {
|
||||||
minY = 1;
|
minY = 1;
|
||||||
}
|
}
|
||||||
BaseBlock airBlock = BlockTypes.AIR.getDefaultState().toBaseBlock();
|
BaseBlock airBlock = BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||||
for (int x = pos1.getX(); x <= pos2.getX(); x++) {
|
for (int x = pos1.getX(); x <= pos2.getX(); x++) {
|
||||||
short absX = (short) ((x - hpw.ROAD_OFFSET_X) % size);
|
short absX = (short) ((x - hybridPlotWorld.ROAD_OFFSET_X) % size);
|
||||||
if (absX < 0) {
|
if (absX < 0) {
|
||||||
absX += size;
|
absX += size;
|
||||||
}
|
}
|
||||||
for (int z = pos1.getZ(); z <= pos2.getZ(); z++) {
|
for (int z = pos1.getZ(); z <= pos2.getZ(); z++) {
|
||||||
short absZ = (short) ((z - hpw.ROAD_OFFSET_Z) % size);
|
short absZ = (short) ((z - hybridPlotWorld.ROAD_OFFSET_Z) % size);
|
||||||
if (absZ < 0) {
|
if (absZ < 0) {
|
||||||
absZ += size;
|
absZ += size;
|
||||||
}
|
}
|
||||||
BaseBlock[] blocks = hpw.G_SCH.get(MathMan.pair(absX, absZ));
|
BaseBlock[] blocks = hybridPlotWorld.G_SCH.get(MathMan.pair(absX, absZ));
|
||||||
if (blocks != null) {
|
if (blocks != null) {
|
||||||
for (int y = 0; y < blocks.length; y++) {
|
for (int y = 0; y < blocks.length; y++) {
|
||||||
if (blocks[y] != null) {
|
if (blocks[y] != null) {
|
||||||
@ -118,40 +117,38 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouth(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouth(Plot plot) {
|
||||||
super.createRoadSouth(plotArea, plot);
|
super.createRoadSouth(plot);
|
||||||
HybridPlotWorld hpw = (HybridPlotWorld) plotArea;
|
|
||||||
PlotId id = plot.getId();
|
PlotId id = plot.getId();
|
||||||
PlotId id2 = new PlotId(id.x, id.y + 1);
|
PlotId id2 = new PlotId(id.x, id.y + 1);
|
||||||
Location bot = getPlotBottomLocAbs(hpw, id2);
|
Location bot = getPlotBottomLocAbs(id2);
|
||||||
Location top = getPlotTopLocAbs(hpw, id);
|
Location top = getPlotTopLocAbs(id);
|
||||||
Location pos1 = new Location(plotArea.worldname, bot.getX() - 1, 0, top.getZ() + 1);
|
Location pos1 = new Location(hybridPlotWorld.worldname, bot.getX() - 1, 0, top.getZ() + 1);
|
||||||
Location pos2 =
|
Location pos2 =
|
||||||
new Location(plotArea.worldname, top.getX() + 1, Math.min(getWorldHeight(), 255),
|
new Location(hybridPlotWorld.worldname, top.getX() + 1, Math.min(getWorldHeight(), 255),
|
||||||
bot.getZ());
|
bot.getZ());
|
||||||
MainUtil.resetBiome(plotArea, pos1, pos2);
|
MainUtil.resetBiome(hybridPlotWorld, pos1, pos2);
|
||||||
if (!hpw.ROAD_SCHEMATIC_ENABLED) {
|
if (!hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LocalBlockQueue queue = hpw.getQueue(false);
|
LocalBlockQueue queue = hybridPlotWorld.getQueue(false);
|
||||||
createSchemAbs(hpw, queue, pos1, pos2);
|
createSchemAbs(queue, pos1, pos2);
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouthEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouthEast(Plot plot) {
|
||||||
super.createRoadSouthEast(plotArea, plot);
|
super.createRoadSouthEast(plot);
|
||||||
HybridPlotWorld hpw = (HybridPlotWorld) plotArea;
|
|
||||||
PlotId id = plot.getId();
|
PlotId id = plot.getId();
|
||||||
PlotId id2 = new PlotId(id.x + 1, id.y + 1);
|
PlotId id2 = new PlotId(id.x + 1, id.y + 1);
|
||||||
Location pos1 = getPlotTopLocAbs(hpw, id).add(1, 0, 1);
|
Location pos1 = getPlotTopLocAbs(id).add(1, 0, 1);
|
||||||
Location pos2 = getPlotBottomLocAbs(hpw, id2);
|
Location pos2 = getPlotBottomLocAbs(id2);
|
||||||
pos1.setY(0);
|
pos1.setY(0);
|
||||||
pos2.setY(Math.min(getWorldHeight(), 255));
|
pos2.setY(Math.min(getWorldHeight(), 255));
|
||||||
LocalBlockQueue queue = hpw.getQueue(false);
|
LocalBlockQueue queue = hybridPlotWorld.getQueue(false);
|
||||||
createSchemAbs(hpw, queue, pos1, pos2);
|
createSchemAbs(queue, pos1, pos2);
|
||||||
if (hpw.ROAD_SCHEMATIC_ENABLED) {
|
if (hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
||||||
createSchemAbs(hpw, queue, pos1, pos2);
|
createSchemAbs(queue, pos1, pos2);
|
||||||
}
|
}
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
@ -164,27 +161,26 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
* don't need to do something quite as complex unless you happen to have 512x512 sized plots.
|
* don't need to do something quite as complex unless you happen to have 512x512 sized plots.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
@Override public boolean clearPlot(final PlotArea plotArea, Plot plot,
|
@Override public boolean clearPlot(Plot plot,
|
||||||
final Runnable whenDone) {
|
final Runnable whenDone) {
|
||||||
final String world = plotArea.worldname;
|
final String world = hybridPlotWorld.worldname;
|
||||||
final HybridPlotWorld dpw = (HybridPlotWorld) plotArea;
|
|
||||||
Location pos1 = plot.getBottomAbs();
|
Location pos1 = plot.getBottomAbs();
|
||||||
Location pos2 = plot.getExtendedTopAbs();
|
Location pos2 = plot.getExtendedTopAbs();
|
||||||
// If augmented
|
// If augmented
|
||||||
final boolean canRegen =
|
final boolean canRegen =
|
||||||
(plotArea.TYPE == 0) && (plotArea.TERRAIN == 0) && REGENERATIVE_CLEAR;
|
(hybridPlotWorld.TYPE == 0) && (hybridPlotWorld.TERRAIN == 0) && REGENERATIVE_CLEAR;
|
||||||
// The component blocks
|
// The component blocks
|
||||||
final BlockBucket plotfloor = dpw.TOP_BLOCK;
|
final BlockBucket plotfloor = hybridPlotWorld.TOP_BLOCK;
|
||||||
final BlockBucket filling = dpw.MAIN_BLOCK;
|
final BlockBucket filling = hybridPlotWorld.MAIN_BLOCK;
|
||||||
final PlotBlock bedrock;
|
final PlotBlock bedrock;
|
||||||
if (dpw.PLOT_BEDROCK) {
|
if (hybridPlotWorld.PLOT_BEDROCK) {
|
||||||
bedrock = PlotBlock.get((short) 7, (byte) 0);
|
bedrock = PlotBlock.get((short) 7, (byte) 0);
|
||||||
} else {
|
} else {
|
||||||
bedrock = PlotBlock.get((short) 0, (byte) 0);
|
bedrock = PlotBlock.get((short) 0, (byte) 0);
|
||||||
}
|
}
|
||||||
final PlotBlock air = PlotBlock.get((short) 0, (byte) 0);
|
final PlotBlock air = PlotBlock.get((short) 0, (byte) 0);
|
||||||
final String biome = dpw.PLOT_BIOME;
|
final String biome = hybridPlotWorld.PLOT_BIOME;
|
||||||
final LocalBlockQueue queue = plotArea.getQueue(false);
|
final LocalBlockQueue queue = hybridPlotWorld.getQueue(false);
|
||||||
ChunkManager.chunkTask(pos1, pos2, new RunnableVal<int[]>() {
|
ChunkManager.chunkTask(pos1, pos2, new RunnableVal<int[]>() {
|
||||||
@Override public void run(int[] value) {
|
@Override public void run(int[] value) {
|
||||||
// If the chunk isn't near the edge and it isn't an augmented world we can just regen the whole chunk
|
// If the chunk isn't near the edge and it isn't an augmented world we can just regen the whole chunk
|
||||||
@ -201,16 +197,16 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
queue.setCuboid(bot, top, bedrock);
|
queue.setCuboid(bot, top, bedrock);
|
||||||
// Each component has a different layer
|
// Each component has a different layer
|
||||||
bot.setY(1);
|
bot.setY(1);
|
||||||
top.setY(dpw.PLOT_HEIGHT);
|
top.setY(hybridPlotWorld.PLOT_HEIGHT);
|
||||||
queue.setCuboid(bot, top, filling);
|
queue.setCuboid(bot, top, filling);
|
||||||
bot.setY(dpw.PLOT_HEIGHT);
|
bot.setY(hybridPlotWorld.PLOT_HEIGHT);
|
||||||
top.setY(dpw.PLOT_HEIGHT + 1);
|
top.setY(hybridPlotWorld.PLOT_HEIGHT + 1);
|
||||||
queue.setCuboid(bot, top, plotfloor);
|
queue.setCuboid(bot, top, plotfloor);
|
||||||
bot.setY(dpw.PLOT_HEIGHT + 1);
|
bot.setY(hybridPlotWorld.PLOT_HEIGHT + 1);
|
||||||
top.setY(getWorldHeight());
|
top.setY(getWorldHeight());
|
||||||
queue.setCuboid(bot, top, air);
|
queue.setCuboid(bot, top, air);
|
||||||
// And finally set the schematic, the y value is unimportant for this function
|
// And finally set the schematic, the y value is unimportant for this function
|
||||||
pastePlotSchematic(dpw, queue, bot, top);
|
pastePlotSchematic(queue, bot, top);
|
||||||
}
|
}
|
||||||
}, () -> {
|
}, () -> {
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
@ -220,19 +216,18 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pastePlotSchematic(HybridPlotWorld plotWorld, LocalBlockQueue queue,
|
public void pastePlotSchematic(LocalBlockQueue queue,
|
||||||
Location bottom, Location top) {
|
Location bottom, Location top) {
|
||||||
if (!plotWorld.PLOT_SCHEMATIC) {
|
if (!hybridPlotWorld.PLOT_SCHEMATIC) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
createSchemAbs(plotWorld, queue, bottom, top);
|
createSchemAbs(queue, bottom, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove sign for a plot.
|
* Remove sign for a plot.
|
||||||
*/
|
*/
|
||||||
@Override public Location getSignLoc(PlotArea plotArea, Plot plot) {
|
@Override public Location getSignLoc(Plot plot) {
|
||||||
HybridPlotWorld dpw = (HybridPlotWorld) plotArea;
|
return hybridPlotWorld.getSignLocation(plot);
|
||||||
return dpw.getSignLocation(plot);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,8 +298,8 @@ public abstract class HybridUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlotManager manager = area.getPlotManager();
|
PlotManager manager = area.getPlotManager();
|
||||||
PlotId id1 = manager.getPlotId(plotWorld, x, 0, z);
|
PlotId id1 = manager.getPlotId(x, 0, z);
|
||||||
PlotId id2 = manager.getPlotId(plotWorld, ex, 0, ez);
|
PlotId id2 = manager.getPlotId(ex, 0, ez);
|
||||||
x -= plotWorld.ROAD_OFFSET_X;
|
x -= plotWorld.ROAD_OFFSET_X;
|
||||||
z -= plotWorld.ROAD_OFFSET_Z;
|
z -= plotWorld.ROAD_OFFSET_Z;
|
||||||
LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(plotWorld.worldname, false);
|
LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(plotWorld.worldname, false);
|
||||||
@ -332,7 +332,7 @@ public abstract class HybridUtils {
|
|||||||
boolean condition;
|
boolean condition;
|
||||||
if (toCheck) {
|
if (toCheck) {
|
||||||
condition = manager
|
condition = manager
|
||||||
.getPlotId(plotWorld, x + X + plotWorld.ROAD_OFFSET_X, 1,
|
.getPlotId(x + X + plotWorld.ROAD_OFFSET_X, 1,
|
||||||
z + Z + plotWorld.ROAD_OFFSET_Z) == null;
|
z + Z + plotWorld.ROAD_OFFSET_Z) == null;
|
||||||
// condition = MainUtil.isPlotRoad(new Location(plotworld.worldname, x + X, 1, z + Z));
|
// condition = MainUtil.isPlotRoad(new Location(plotworld.worldname, x + X, 1, z + Z));
|
||||||
} else {
|
} else {
|
||||||
|
@ -26,7 +26,7 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean clearPlot(PlotArea plotArea, final Plot plot, final Runnable whenDone) {
|
public boolean clearPlot(final Plot plot, final Runnable whenDone) {
|
||||||
final HashSet<RegionWrapper> regions = plot.getRegions();
|
final HashSet<RegionWrapper> regions = plot.getRegions();
|
||||||
Runnable run = new Runnable() {
|
Runnable run = new Runnable() {
|
||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
@ -48,39 +48,37 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Location getPlotTopLocAbs(PlotArea plotArea, PlotId plotId) {
|
@Override public Location getPlotTopLocAbs(PlotId plotId) {
|
||||||
SquarePlotWorld dpw = (SquarePlotWorld) plotArea;
|
|
||||||
int px = plotId.x;
|
int px = plotId.x;
|
||||||
int pz = plotId.y;
|
int pz = plotId.y;
|
||||||
int x = (dpw.ROAD_OFFSET_X + (px * (dpw.ROAD_WIDTH + dpw.PLOT_WIDTH))) - (int) Math
|
int x = (squarePlotWorld.ROAD_OFFSET_X + (px * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - (int) Math
|
||||||
.floor(dpw.ROAD_WIDTH / 2) - 1;
|
.floor(squarePlotWorld.ROAD_WIDTH / 2) - 1;
|
||||||
int z = (dpw.ROAD_OFFSET_Z + (pz * (dpw.ROAD_WIDTH + dpw.PLOT_WIDTH))) - (int) Math
|
int z = (squarePlotWorld.ROAD_OFFSET_Z + (pz * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - (int) Math
|
||||||
.floor(dpw.ROAD_WIDTH / 2) - 1;
|
.floor(squarePlotWorld.ROAD_WIDTH / 2) - 1;
|
||||||
return new Location(plotArea.worldname, x, Math.min(getWorldHeight(), 255), z);
|
return new Location(squarePlotWorld.worldname, x, Math.min(getWorldHeight(), 255), z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotId getPlotIdAbs(PlotArea plotArea, int x, int y, int z) {
|
@Override public PlotId getPlotIdAbs(int x, int y, int z) {
|
||||||
SquarePlotWorld dpw = (SquarePlotWorld) plotArea;
|
if (squarePlotWorld.ROAD_OFFSET_X != 0) {
|
||||||
if (dpw.ROAD_OFFSET_X != 0) {
|
x -= squarePlotWorld.ROAD_OFFSET_X;
|
||||||
x -= dpw.ROAD_OFFSET_X;
|
|
||||||
}
|
}
|
||||||
if (dpw.ROAD_OFFSET_Z != 0) {
|
if (squarePlotWorld.ROAD_OFFSET_Z != 0) {
|
||||||
z -= dpw.ROAD_OFFSET_Z;
|
z -= squarePlotWorld.ROAD_OFFSET_Z;
|
||||||
}
|
}
|
||||||
int pathWidthLower;
|
int pathWidthLower;
|
||||||
int end;
|
int end;
|
||||||
if (dpw.ROAD_WIDTH == 0) {
|
if (squarePlotWorld.ROAD_WIDTH == 0) {
|
||||||
pathWidthLower = -1;
|
pathWidthLower = -1;
|
||||||
end = dpw.PLOT_WIDTH;
|
end = squarePlotWorld.PLOT_WIDTH;
|
||||||
} else {
|
} else {
|
||||||
if ((dpw.ROAD_WIDTH % 2) == 0) {
|
if ((squarePlotWorld.ROAD_WIDTH % 2) == 0) {
|
||||||
pathWidthLower = (dpw.ROAD_WIDTH / 2) - 1;
|
pathWidthLower = (squarePlotWorld.ROAD_WIDTH / 2) - 1;
|
||||||
} else {
|
} else {
|
||||||
pathWidthLower = dpw.ROAD_WIDTH / 2;
|
pathWidthLower = squarePlotWorld.ROAD_WIDTH / 2;
|
||||||
}
|
}
|
||||||
end = pathWidthLower + dpw.PLOT_WIDTH;
|
end = pathWidthLower + squarePlotWorld.PLOT_WIDTH;
|
||||||
}
|
}
|
||||||
int size = dpw.PLOT_WIDTH + dpw.ROAD_WIDTH;
|
int size = squarePlotWorld.PLOT_WIDTH + squarePlotWorld.ROAD_WIDTH;
|
||||||
int idx;
|
int idx;
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
idx = x / size;
|
idx = x / size;
|
||||||
@ -128,27 +126,23 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
return new PlotId(idx, idz);
|
return new PlotId(idx, idz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotId getPlotId(PlotArea plotArea, int x, int y, int z) {
|
@Override public PlotId getPlotId(int x, int y, int z) {
|
||||||
try {
|
try {
|
||||||
SquarePlotWorld dpw = (SquarePlotWorld) plotArea;
|
x -= squarePlotWorld.ROAD_OFFSET_X;
|
||||||
if (plotArea == null) {
|
z -= squarePlotWorld.ROAD_OFFSET_Z;
|
||||||
return null;
|
int size = squarePlotWorld.PLOT_WIDTH + squarePlotWorld.ROAD_WIDTH;
|
||||||
}
|
|
||||||
x -= dpw.ROAD_OFFSET_X;
|
|
||||||
z -= dpw.ROAD_OFFSET_Z;
|
|
||||||
int size = dpw.PLOT_WIDTH + dpw.ROAD_WIDTH;
|
|
||||||
int pathWidthLower;
|
int pathWidthLower;
|
||||||
int end;
|
int end;
|
||||||
if (dpw.ROAD_WIDTH == 0) {
|
if (squarePlotWorld.ROAD_WIDTH == 0) {
|
||||||
pathWidthLower = -1;
|
pathWidthLower = -1;
|
||||||
end = dpw.PLOT_WIDTH;
|
end = squarePlotWorld.PLOT_WIDTH;
|
||||||
} else {
|
} else {
|
||||||
if ((dpw.ROAD_WIDTH % 2) == 0) {
|
if ((squarePlotWorld.ROAD_WIDTH % 2) == 0) {
|
||||||
pathWidthLower = (dpw.ROAD_WIDTH / 2) - 1;
|
pathWidthLower = (squarePlotWorld.ROAD_WIDTH / 2) - 1;
|
||||||
} else {
|
} else {
|
||||||
pathWidthLower = dpw.ROAD_WIDTH / 2;
|
pathWidthLower = squarePlotWorld.ROAD_WIDTH / 2;
|
||||||
}
|
}
|
||||||
end = pathWidthLower + dpw.PLOT_WIDTH;
|
end = pathWidthLower + squarePlotWorld.PLOT_WIDTH;
|
||||||
}
|
}
|
||||||
int dx;
|
int dx;
|
||||||
int rx;
|
int rx;
|
||||||
@ -176,7 +170,7 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
if (hash == 0) {
|
if (hash == 0) {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
Plot plot = plotArea.getOwnedPlotAbs(id);
|
Plot plot = squarePlotWorld.getOwnedPlotAbs(id);
|
||||||
// Not merged, and standing on road
|
// Not merged, and standing on road
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return null;
|
return null;
|
||||||
@ -210,7 +204,7 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
PlotSquared.debug("invalid location: " + Arrays.toString(merged));
|
PlotSquared.debug("invalid location: " + Arrays.toString(merged));
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
PlotSquared.debug(
|
PlotSquared.debug(
|
||||||
"Invalid plot / road width in settings.yml for world: " + plotArea.worldname);
|
"Invalid plot / road width in settings.yml for world: " + squarePlotWorld.worldname);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -218,14 +212,13 @@ public abstract class SquarePlotManager extends GridPlotManager {
|
|||||||
/**
|
/**
|
||||||
* Get the bottom plot loc (some basic math).
|
* Get the bottom plot loc (some basic math).
|
||||||
*/
|
*/
|
||||||
@Override public Location getPlotBottomLocAbs(PlotArea plotArea, PlotId plotId) {
|
@Override public Location getPlotBottomLocAbs(PlotId plotId) {
|
||||||
SquarePlotWorld dpw = (SquarePlotWorld) plotArea;
|
|
||||||
int px = plotId.x;
|
int px = plotId.x;
|
||||||
int pz = plotId.y;
|
int pz = plotId.y;
|
||||||
int x = (dpw.ROAD_OFFSET_X + (px * (dpw.ROAD_WIDTH + dpw.PLOT_WIDTH))) - dpw.PLOT_WIDTH
|
int x = (squarePlotWorld.ROAD_OFFSET_X + (px * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - squarePlotWorld.PLOT_WIDTH
|
||||||
- (int) Math.floor(dpw.ROAD_WIDTH / 2);
|
- (int) Math.floor(squarePlotWorld.ROAD_WIDTH / 2);
|
||||||
int z = (dpw.ROAD_OFFSET_Z + (pz * (dpw.ROAD_WIDTH + dpw.PLOT_WIDTH))) - dpw.PLOT_WIDTH
|
int z = (squarePlotWorld.ROAD_OFFSET_Z + (pz * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - squarePlotWorld.PLOT_WIDTH
|
||||||
- (int) Math.floor(dpw.ROAD_WIDTH / 2);
|
- (int) Math.floor(squarePlotWorld.ROAD_WIDTH / 2);
|
||||||
return new Location(plotArea.worldname, x, plotArea.MIN_BUILD_HEIGHT, z);
|
return new Location(squarePlotWorld.worldname, x, squarePlotWorld.MIN_BUILD_HEIGHT, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -854,9 +854,9 @@ public class Plot {
|
|||||||
};
|
};
|
||||||
for (Plot current : plots) {
|
for (Plot current : plots) {
|
||||||
if (isDelete || current.owner == null) {
|
if (isDelete || current.owner == null) {
|
||||||
manager.unClaimPlot(Plot.this.area, current, null);
|
manager.unClaimPlot(current, null);
|
||||||
} else {
|
} else {
|
||||||
manager.claimPlot(Plot.this.area, current);
|
manager.claimPlot(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GlobalBlockQueue.IMP.addTask(run);
|
GlobalBlockQueue.IMP.addTask(run);
|
||||||
@ -868,7 +868,7 @@ public class Plot {
|
|||||||
.regenerateRegion(current.getBottomAbs(), current.getTopAbs(), false, this);
|
.regenerateRegion(current.getBottomAbs(), current.getTopAbs(), false, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
manager.clearPlot(Plot.this.area, current, this);
|
manager.clearPlot(current, this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
run.run();
|
run.run();
|
||||||
@ -943,20 +943,20 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
PlotManager manager = this.area.getPlotManager();
|
PlotManager manager = this.area.getPlotManager();
|
||||||
if (createRoad) {
|
if (createRoad) {
|
||||||
manager.startPlotUnlink(this.area, ids);
|
manager.startPlotUnlink(ids);
|
||||||
}
|
}
|
||||||
if (this.area.TERRAIN != 3 && createRoad) {
|
if (this.area.TERRAIN != 3 && createRoad) {
|
||||||
for (Plot current : plots) {
|
for (Plot current : plots) {
|
||||||
if (current.getMerged(Direction.EAST)) {
|
if (current.getMerged(Direction.EAST)) {
|
||||||
manager.createRoadEast(current.area, current);
|
manager.createRoadEast(current);
|
||||||
if (current.getMerged(Direction.SOUTH)) {
|
if (current.getMerged(Direction.SOUTH)) {
|
||||||
manager.createRoadSouth(current.area, current);
|
manager.createRoadSouth(current);
|
||||||
if (current.getMerged(Direction.SOUTHEAST)) {
|
if (current.getMerged(Direction.SOUTHEAST)) {
|
||||||
manager.createRoadSouthEast(current.area, current);
|
manager.createRoadSouthEast(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (current.getMerged(Direction.SOUTH)) {
|
} else if (current.getMerged(Direction.SOUTH)) {
|
||||||
manager.createRoadSouth(current.area, current);
|
manager.createRoadSouth(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -972,7 +972,7 @@ public class Plot {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (createRoad) {
|
if (createRoad) {
|
||||||
manager.finishPlotUnlink(this.area, ids);
|
manager.finishPlotUnlink(ids);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -992,7 +992,7 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
PlotManager manager = this.area.getPlotManager();
|
PlotManager manager = this.area.getPlotManager();
|
||||||
if (this.area.ALLOW_SIGNS) {
|
if (this.area.ALLOW_SIGNS) {
|
||||||
Location loc = manager.getSignLoc(this.area, this);
|
Location loc = manager.getSignLoc(this);
|
||||||
String id = this.id.x + ";" + this.id.y;
|
String id = this.id.x + ";" + this.id.y;
|
||||||
String[] lines =
|
String[] lines =
|
||||||
new String[] {Captions.OWNER_SIGN_LINE_1.formatted().replaceAll("%id%", id),
|
new String[] {Captions.OWNER_SIGN_LINE_1.formatted().replaceAll("%id%", id),
|
||||||
@ -1207,7 +1207,7 @@ public class Plot {
|
|||||||
int y =
|
int y =
|
||||||
isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), loc.getX(), loc.getZ()) : 62;
|
isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), loc.getX(), loc.getZ()) : 62;
|
||||||
if (area.ALLOW_SIGNS) {
|
if (area.ALLOW_SIGNS) {
|
||||||
y = Math.max(y, getManager().getSignLoc(area, this).getY());
|
y = Math.max(y, getManager().getSignLoc(this).getY());
|
||||||
}
|
}
|
||||||
loc.setY(1 + y);
|
loc.setY(1 + y);
|
||||||
return loc;
|
return loc;
|
||||||
@ -1220,7 +1220,7 @@ public class Plot {
|
|||||||
PlotManager manager = getManager();
|
PlotManager manager = getManager();
|
||||||
int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), x, z) : 62;
|
int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), x, z) : 62;
|
||||||
if (area.ALLOW_SIGNS && (y <= 0 || y >= 255)) {
|
if (area.ALLOW_SIGNS && (y <= 0 || y >= 255)) {
|
||||||
y = Math.max(y, manager.getSignLoc(area, this).getY() - 1);
|
y = Math.max(y, manager.getSignLoc(this).getY() - 1);
|
||||||
}
|
}
|
||||||
return new Location(getWorldName(), x, y + 1, z);
|
return new Location(getWorldName(), x, y + 1, z);
|
||||||
}
|
}
|
||||||
@ -1413,7 +1413,7 @@ public class Plot {
|
|||||||
if (!this.area.ALLOW_SIGNS) {
|
if (!this.area.ALLOW_SIGNS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Location loc = manager.getSignLoc(this.area, this);
|
Location loc = manager.getSignLoc(this);
|
||||||
LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(getWorldName(), false);
|
LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(getWorldName(), false);
|
||||||
queue.setBlock(loc.getX(), loc.getY(), loc.getZ(), PlotBlock.get("air"));
|
queue.setBlock(loc.getX(), loc.getY(), loc.getZ(), PlotBlock.get("air"));
|
||||||
queue.flush();
|
queue.flush();
|
||||||
@ -1496,7 +1496,7 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
plotworld.getPlotManager().claimPlot(plotworld, this);
|
plotworld.getPlotManager().claimPlot(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1565,7 +1565,7 @@ public class Plot {
|
|||||||
* Returns the top location for the plot.
|
* Returns the top location for the plot.
|
||||||
*/
|
*/
|
||||||
public Location getTopAbs() {
|
public Location getTopAbs() {
|
||||||
Location top = this.area.getPlotManager().getPlotTopLocAbs(this.area, this.id);
|
Location top = getManager().getPlotTopLocAbs(this.id);
|
||||||
top.setWorld(getWorldName());
|
top.setWorld(getWorldName());
|
||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
@ -1576,7 +1576,7 @@ public class Plot {
|
|||||||
* Returns the bottom location for the plot.
|
* Returns the bottom location for the plot.
|
||||||
*/
|
*/
|
||||||
public Location getBottomAbs() {
|
public Location getBottomAbs() {
|
||||||
Location loc = this.area.getPlotManager().getPlotBottomLocAbs(this.area, this.id);
|
Location loc = getManager().getPlotBottomLocAbs(this.id);
|
||||||
loc.setWorld(getWorldName());
|
loc.setWorld(getWorldName());
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
@ -1724,7 +1724,7 @@ public class Plot {
|
|||||||
Location pos2 = new Location(this.getWorldName(), bot.getX(), MAX_HEIGHT, top.getZ());
|
Location pos2 = new Location(this.getWorldName(), bot.getX(), MAX_HEIGHT, top.getZ());
|
||||||
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
||||||
} else {
|
} else {
|
||||||
this.area.getPlotManager().removeRoadEast(this.area, this);
|
this.area.getPlotManager().removeRoadEast(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2124,7 +2124,7 @@ public class Plot {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final Location loc = this.getManager().getSignLoc(this.area, this);
|
final Location loc = this.getManager().getSignLoc(this);
|
||||||
String[] lines = TaskManager.IMP.sync(new RunnableVal<String[]>() {
|
String[] lines = TaskManager.IMP.sync(new RunnableVal<String[]>() {
|
||||||
@Override public void run(String[] value) {
|
@Override public void run(String[] value) {
|
||||||
ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false);
|
ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false);
|
||||||
@ -2193,7 +2193,7 @@ public class Plot {
|
|||||||
Location pos2 = new Location(this.getWorldName(), top.getX(), MAX_HEIGHT, bot.getZ());
|
Location pos2 = new Location(this.getWorldName(), top.getX(), MAX_HEIGHT, bot.getZ());
|
||||||
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
||||||
} else {
|
} else {
|
||||||
this.getManager().removeRoadSouth(this.area, this);
|
this.getManager().removeRoadSouth(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2246,7 +2246,7 @@ public class Plot {
|
|||||||
ArrayList<PlotId> ids = new ArrayList<>();
|
ArrayList<PlotId> ids = new ArrayList<>();
|
||||||
ids.add(current.getId());
|
ids.add(current.getId());
|
||||||
ids.add(other.getId());
|
ids.add(other.getId());
|
||||||
this.getManager().finishPlotMerge(this.area, ids);
|
this.getManager().finishPlotMerge(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2265,7 +2265,7 @@ public class Plot {
|
|||||||
ArrayList<PlotId> ids = new ArrayList<>();
|
ArrayList<PlotId> ids = new ArrayList<>();
|
||||||
ids.add(current.getId());
|
ids.add(current.getId());
|
||||||
ids.add(other.getId());
|
ids.add(other.getId());
|
||||||
this.getManager().finishPlotMerge(this.area, ids);
|
this.getManager().finishPlotMerge(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2284,7 +2284,7 @@ public class Plot {
|
|||||||
ArrayList<PlotId> ids = new ArrayList<>();
|
ArrayList<PlotId> ids = new ArrayList<>();
|
||||||
ids.add(current.getId());
|
ids.add(current.getId());
|
||||||
ids.add(other.getId());
|
ids.add(other.getId());
|
||||||
this.getManager().finishPlotMerge(this.area, ids);
|
this.getManager().finishPlotMerge(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2303,7 +2303,7 @@ public class Plot {
|
|||||||
ArrayList<PlotId> ids = new ArrayList<>();
|
ArrayList<PlotId> ids = new ArrayList<>();
|
||||||
ids.add(current.getId());
|
ids.add(current.getId());
|
||||||
ids.add(other.getId());
|
ids.add(other.getId());
|
||||||
this.getManager().finishPlotMerge(this.area, ids);
|
this.getManager().finishPlotMerge(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2372,7 +2372,7 @@ public class Plot {
|
|||||||
pos2.setY(MAX_HEIGHT);
|
pos2.setY(MAX_HEIGHT);
|
||||||
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
ChunkManager.manager.regenerateRegion(pos1, pos2, true, null);
|
||||||
} else {
|
} else {
|
||||||
this.area.getPlotManager().removeRoadSouthEast(this.area, this);
|
this.area.getPlotManager().removeRoadSouthEast(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2813,15 +2813,15 @@ public class Plot {
|
|||||||
*/
|
*/
|
||||||
public boolean setComponent(String component, BlockBucket blocks) {
|
public boolean setComponent(String component, BlockBucket blocks) {
|
||||||
if (StringMan
|
if (StringMan
|
||||||
.isEqualToAny(component, getManager().getPlotComponents(this.area, this.getId()))) {
|
.isEqualToAny(component, getManager().getPlotComponents(this.getId()))) {
|
||||||
EventUtil.manager.callComponentSet(this, component);
|
EventUtil.manager.callComponentSet(this, component);
|
||||||
}
|
}
|
||||||
return this.getManager().setComponent(this.area, this.getId(), component, blocks);
|
return this.getManager().setComponent(this.getId(), component, blocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDistanceFromOrigin() {
|
public int getDistanceFromOrigin() {
|
||||||
Location bot = getManager().getPlotBottomLocAbs(this.area, id);
|
Location bot = getManager().getPlotBottomLocAbs(id);
|
||||||
Location top = getManager().getPlotTopLocAbs(this.area, id);
|
Location top = getManager().getPlotTopLocAbs(id);
|
||||||
return Math.max(Math.max(Math.abs(bot.getX()), Math.abs(bot.getZ())),
|
return Math.max(Math.max(Math.abs(bot.getX()), Math.abs(bot.getZ())),
|
||||||
Math.max(Math.abs(top.getX()), Math.abs(top.getZ())));
|
Math.max(Math.abs(top.getX()), Math.abs(top.getZ())));
|
||||||
}
|
}
|
||||||
@ -2967,10 +2967,10 @@ public class Plot {
|
|||||||
if (regions.isEmpty()) {
|
if (regions.isEmpty()) {
|
||||||
Plot plot = destination.getRelative(0, 0);
|
Plot plot = destination.getRelative(0, 0);
|
||||||
for (Plot current : plot.getConnectedPlots()) {
|
for (Plot current : plot.getConnectedPlots()) {
|
||||||
getManager().claimPlot(current.getArea(), current);
|
getManager().claimPlot(current);
|
||||||
Plot originPlot = originArea.getPlotAbs(
|
Plot originPlot = originArea.getPlotAbs(
|
||||||
new PlotId(current.id.x - offset.x, current.id.y - offset.y));
|
new PlotId(current.id.x - offset.x, current.id.y - offset.y));
|
||||||
originPlot.getManager().unClaimPlot(originArea, originPlot, null);
|
originPlot.getManager().unClaimPlot(originPlot, null);
|
||||||
}
|
}
|
||||||
plot.setSign();
|
plot.setSign();
|
||||||
TaskManager.runTask(whenDone);
|
TaskManager.runTask(whenDone);
|
||||||
@ -3056,7 +3056,7 @@ public class Plot {
|
|||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
if (regions.isEmpty()) {
|
if (regions.isEmpty()) {
|
||||||
for (Plot current : getConnectedPlots()) {
|
for (Plot current : getConnectedPlots()) {
|
||||||
destination.getManager().claimPlot(destination.getArea(), destination);
|
destination.getManager().claimPlot(destination);
|
||||||
}
|
}
|
||||||
destination.setSign();
|
destination.setSign();
|
||||||
TaskManager.runTask(whenDone);
|
TaskManager.runTask(whenDone);
|
||||||
|
@ -144,8 +144,8 @@ public abstract class PlotArea {
|
|||||||
private RegionWrapper getRegionAbs() {
|
private RegionWrapper getRegionAbs() {
|
||||||
if (this.region == null) {
|
if (this.region == null) {
|
||||||
if (this.min != null) {
|
if (this.min != null) {
|
||||||
Location bot = getPlotManager().getPlotBottomLocAbs(this, this.min);
|
Location bot = getPlotManager().getPlotBottomLocAbs(this.min);
|
||||||
Location top = getPlotManager().getPlotTopLocAbs(this, this.max);
|
Location top = getPlotManager().getPlotTopLocAbs(this.max);
|
||||||
this.region = new RegionWrapper(bot.getX() - 1, top.getX() + 1, bot.getZ() - 1,
|
this.region = new RegionWrapper(bot.getX() - 1, top.getX() + 1, bot.getZ() - 1,
|
||||||
top.getZ() + 1);
|
top.getZ() + 1);
|
||||||
}
|
}
|
||||||
@ -422,7 +422,7 @@ public abstract class PlotArea {
|
|||||||
*/
|
*/
|
||||||
@Nullable public Plot getPlotAbs(@Nonnull final Location location) {
|
@Nullable public Plot getPlotAbs(@Nonnull final Location location) {
|
||||||
final PlotId pid =
|
final PlotId pid =
|
||||||
this.manager.getPlotId(this, location.getX(), location.getY(), location.getZ());
|
this.manager.getPlotId(location.getX(), location.getY(), location.getZ());
|
||||||
if (pid == null) {
|
if (pid == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -437,7 +437,7 @@ public abstract class PlotArea {
|
|||||||
*/
|
*/
|
||||||
@Nullable public Plot getPlot(@Nonnull final Location location) {
|
@Nullable public Plot getPlot(@Nonnull final Location location) {
|
||||||
final PlotId pid =
|
final PlotId pid =
|
||||||
this.manager.getPlotId(this, location.getX(), location.getY(), location.getZ());
|
this.manager.getPlotId(location.getX(), location.getY(), location.getZ());
|
||||||
if (pid == null) {
|
if (pid == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -452,7 +452,7 @@ public abstract class PlotArea {
|
|||||||
*/
|
*/
|
||||||
@Nullable public Plot getOwnedPlot(@Nonnull final Location location) {
|
@Nullable public Plot getOwnedPlot(@Nonnull final Location location) {
|
||||||
final PlotId pid =
|
final PlotId pid =
|
||||||
this.manager.getPlotId(this, location.getX(), location.getY(), location.getZ());
|
this.manager.getPlotId(location.getX(), location.getY(), location.getZ());
|
||||||
if (pid == null) {
|
if (pid == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ public abstract class PlotArea {
|
|||||||
*/
|
*/
|
||||||
@Nullable public Plot getOwnedPlotAbs(@Nonnull final Location location) {
|
@Nullable public Plot getOwnedPlotAbs(@Nonnull final Location location) {
|
||||||
final PlotId pid =
|
final PlotId pid =
|
||||||
this.manager.getPlotId(this, location.getX(), location.getY(), location.getZ());
|
this.manager.getPlotId(location.getX(), location.getY(), location.getZ());
|
||||||
if (pid == null) {
|
if (pid == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -835,7 +835,7 @@ public abstract class PlotArea {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
manager.startPlotMerge(this, plotIds);
|
manager.startPlotMerge(plotIds);
|
||||||
final Set<UUID> trusted = new HashSet<>();
|
final Set<UUID> trusted = new HashSet<>();
|
||||||
final Set<UUID> members = new HashSet<>();
|
final Set<UUID> members = new HashSet<>();
|
||||||
final Set<UUID> denied = new HashSet<>();
|
final Set<UUID> denied = new HashSet<>();
|
||||||
@ -887,7 +887,7 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
manager.finishPlotMerge(this, plotIds);
|
manager.finishPlotMerge(plotIds);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ public class PlotCluster {
|
|||||||
toReturn = center.getHome();
|
toReturn = center.getHome();
|
||||||
if (toReturn.getY() == 0) {
|
if (toReturn.getY() == 0) {
|
||||||
PlotManager manager = this.area.getPlotManager();
|
PlotManager manager = this.area.getPlotManager();
|
||||||
Location loc = manager.getSignLoc(this.area, center);
|
Location loc = manager.getSignLoc(center);
|
||||||
toReturn.setY(loc.getY());
|
toReturn.setY(loc.getY());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -157,12 +157,12 @@ public class PlotCluster {
|
|||||||
|
|
||||||
public Location getClusterBottom() {
|
public Location getClusterBottom() {
|
||||||
PlotManager manager = this.area.getPlotManager();
|
PlotManager manager = this.area.getPlotManager();
|
||||||
return manager.getPlotBottomLocAbs(this.area, getP1());
|
return manager.getPlotBottomLocAbs(getP1());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location getClusterTop() {
|
public Location getClusterTop() {
|
||||||
PlotManager manager = this.area.getPlotManager();
|
PlotManager manager = this.area.getPlotManager();
|
||||||
return manager.getPlotTopLocAbs(this.area, getP2());
|
return manager.getPlotTopLocAbs(getP2());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean intersects(PlotId pos1, PlotId pos2) {
|
public boolean intersects(PlotId pos1, PlotId pos2) {
|
||||||
|
@ -21,61 +21,61 @@ public abstract class PlotManager {
|
|||||||
* Plot locations (methods with Abs in them will not need to consider mega
|
* Plot locations (methods with Abs in them will not need to consider mega
|
||||||
* plots).
|
* plots).
|
||||||
*/
|
*/
|
||||||
public abstract PlotId getPlotIdAbs(PlotArea plotArea, int x, int y, int z);
|
public abstract PlotId getPlotIdAbs(int x, int y, int z);
|
||||||
|
|
||||||
public abstract PlotId getPlotId(PlotArea plotArea, int x, int y, int z);
|
public abstract PlotId getPlotId(int x, int y, int z);
|
||||||
|
|
||||||
// If you have a circular plot, just return the corner if it were a square
|
// If you have a circular plot, just return the corner if it were a square
|
||||||
public abstract Location getPlotBottomLocAbs(PlotArea plotArea, PlotId plotId);
|
public abstract Location getPlotBottomLocAbs(PlotId plotId);
|
||||||
|
|
||||||
// the same applies here
|
// the same applies here
|
||||||
public abstract Location getPlotTopLocAbs(PlotArea plotArea, PlotId plotId);
|
public abstract Location getPlotTopLocAbs(PlotId plotId);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Plot clearing (return false if you do not support some method)
|
* Plot clearing (return false if you do not support some method)
|
||||||
*/
|
*/
|
||||||
public abstract boolean clearPlot(PlotArea plotArea, Plot plot, Runnable whenDone);
|
public abstract boolean clearPlot(Plot plot, Runnable whenDone);
|
||||||
|
|
||||||
public abstract boolean claimPlot(PlotArea plotArea, Plot plot);
|
public abstract boolean claimPlot(Plot plot);
|
||||||
|
|
||||||
public abstract boolean unClaimPlot(PlotArea plotArea, Plot plot, Runnable whenDone);
|
public abstract boolean unClaimPlot(Plot plot, Runnable whenDone);
|
||||||
|
|
||||||
public abstract Location getSignLoc(PlotArea plotArea, Plot plot);
|
public abstract Location getSignLoc(Plot plot);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Plot set functions (return false if you do not support the specific set
|
* Plot set functions (return false if you do not support the specific set
|
||||||
* method).
|
* method).
|
||||||
*/
|
*/
|
||||||
public abstract String[] getPlotComponents(PlotArea plotArea, PlotId plotId);
|
public abstract String[] getPlotComponents(PlotId plotId);
|
||||||
|
|
||||||
public abstract boolean setComponent(PlotArea plotArea, PlotId plotId, String component,
|
public abstract boolean setComponent(PlotId plotId, String component,
|
||||||
BlockBucket blocks);
|
BlockBucket blocks);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PLOT MERGING (return false if your generator does not support plot
|
* PLOT MERGING (return false if your generator does not support plot
|
||||||
* merging).
|
* merging).
|
||||||
*/
|
*/
|
||||||
public abstract boolean createRoadEast(PlotArea plotArea, Plot plot);
|
public abstract boolean createRoadEast(Plot plot);
|
||||||
|
|
||||||
public abstract boolean createRoadSouth(PlotArea plotArea, Plot plot);
|
public abstract boolean createRoadSouth(Plot plot);
|
||||||
|
|
||||||
public abstract boolean createRoadSouthEast(PlotArea plotArea, Plot plot);
|
public abstract boolean createRoadSouthEast(Plot plot);
|
||||||
|
|
||||||
public abstract boolean removeRoadEast(PlotArea plotArea, Plot plot);
|
public abstract boolean removeRoadEast(Plot plot);
|
||||||
|
|
||||||
public abstract boolean removeRoadSouth(PlotArea plotArea, Plot plot);
|
public abstract boolean removeRoadSouth(Plot plot);
|
||||||
|
|
||||||
public abstract boolean removeRoadSouthEast(PlotArea plotArea, Plot plot);
|
public abstract boolean removeRoadSouthEast(Plot plot);
|
||||||
|
|
||||||
public abstract boolean startPlotMerge(PlotArea plotArea, List<PlotId> plotIds);
|
public abstract boolean startPlotMerge(List<PlotId> plotIds);
|
||||||
|
|
||||||
public abstract boolean startPlotUnlink(PlotArea plotArea, List<PlotId> plotIds);
|
public abstract boolean startPlotUnlink(List<PlotId> plotIds);
|
||||||
|
|
||||||
public abstract boolean finishPlotMerge(PlotArea plotArea, List<PlotId> plotIds);
|
public abstract boolean finishPlotMerge(List<PlotId> plotIds);
|
||||||
|
|
||||||
public abstract boolean finishPlotUnlink(PlotArea plotArea, List<PlotId> plotIds);
|
public abstract boolean finishPlotUnlink(List<PlotId> plotIds);
|
||||||
|
|
||||||
public void exportTemplate(PlotArea plotArea) throws IOException {
|
public void exportTemplate() throws IOException {
|
||||||
HashSet<FileBytes> files = new HashSet<>(Collections.singletonList(
|
HashSet<FileBytes> files = new HashSet<>(Collections.singletonList(
|
||||||
new FileBytes(Settings.Paths.TEMPLATES + "/tmp-data.yml",
|
new FileBytes(Settings.Paths.TEMPLATES + "/tmp-data.yml",
|
||||||
Template.getBytes(plotArea))));
|
Template.getBytes(plotArea))));
|
||||||
|
@ -14,23 +14,23 @@ public class SinglePlotManager extends PlotManager {
|
|||||||
super(plotArea);
|
super(plotArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotId getPlotIdAbs(PlotArea plotArea, int x, int y, int z) {
|
@Override public PlotId getPlotIdAbs(int x, int y, int z) {
|
||||||
return new PlotId(0, 0);
|
return new PlotId(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotId getPlotId(PlotArea plotArea, int x, int y, int z) {
|
@Override public PlotId getPlotId(int x, int y, int z) {
|
||||||
return new PlotId(0, 0);
|
return new PlotId(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Location getPlotBottomLocAbs(PlotArea plotArea, PlotId plotId) {
|
@Override public Location getPlotBottomLocAbs(PlotId plotId) {
|
||||||
return new Location(plotId.toCommaSeparatedString(), -30000000, 0, -30000000);
|
return new Location(plotId.toCommaSeparatedString(), -30000000, 0, -30000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Location getPlotTopLocAbs(PlotArea plotArea, PlotId plotId) {
|
@Override public Location getPlotTopLocAbs(PlotId plotId) {
|
||||||
return new Location(plotId.toCommaSeparatedString(), 30000000, 0, 30000000);
|
return new Location(plotId.toCommaSeparatedString(), 30000000, 0, 30000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean clearPlot(PlotArea plotArea, Plot plot, final Runnable whenDone) {
|
@Override public boolean clearPlot(Plot plot, final Runnable whenDone) {
|
||||||
SetupUtils.manager.unload(plot.getWorldName(), false);
|
SetupUtils.manager.unload(plot.getWorldName(), false);
|
||||||
final File worldFolder =
|
final File worldFolder =
|
||||||
new File(PlotSquared.get().IMP.getWorldContainer(), plot.getWorldName());
|
new File(PlotSquared.get().IMP.getWorldContainer(), plot.getWorldName());
|
||||||
@ -43,68 +43,68 @@ public class SinglePlotManager extends PlotManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean claimPlot(PlotArea plotArea, Plot plot) {
|
@Override public boolean claimPlot(Plot plot) {
|
||||||
// TODO
|
// TODO
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean unClaimPlot(PlotArea plotArea, Plot plot, Runnable whenDone) {
|
@Override public boolean unClaimPlot(Plot plot, Runnable whenDone) {
|
||||||
if (whenDone != null) {
|
if (whenDone != null) {
|
||||||
whenDone.run();
|
whenDone.run();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Location getSignLoc(PlotArea plotArea, Plot plot) {
|
@Override public Location getSignLoc(Plot plot) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String[] getPlotComponents(PlotArea plotArea, PlotId plotId) {
|
@Override public String[] getPlotComponents(PlotId plotId) {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean setComponent(PlotArea plotArea, PlotId plotId, String component,
|
@Override public boolean setComponent(PlotId plotId, String component,
|
||||||
BlockBucket blocks) {
|
BlockBucket blocks) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadEast(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouth(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouth(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean createRoadSouthEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean createRoadSouthEast(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadEast(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadSouth(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadSouth(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean removeRoadSouthEast(PlotArea plotArea, Plot plot) {
|
@Override public boolean removeRoadSouthEast(Plot plot) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean startPlotMerge(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean startPlotMerge(List<PlotId> plotIds) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean startPlotUnlink(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean startPlotUnlink(List<PlotId> plotIds) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean finishPlotMerge(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean finishPlotMerge(List<PlotId> plotIds) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean finishPlotUnlink(PlotArea plotArea, List<PlotId> plotIds) {
|
@Override public boolean finishPlotUnlink(List<PlotId> plotIds) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user