added startMerge to plotManager

This commit is contained in:
boy0001 2014-10-18 15:49:08 +11:00
parent fc9a31cbf4
commit 04e8c5a8c4
4 changed files with 23 additions and 3 deletions

View File

@ -100,7 +100,9 @@ public class PlotHelper {
PlotManager manager = PlotMain.getPlotManager(world);
PlotWorld plotworld = PlotMain.getWorldSettings(world);
manager.startPlotMerge(world, plotworld, plotIds);
for (int x = pos1.x; x <= pos2.x; x++) {
for (int y = pos1.y; y <= pos2.y; y++) {

View File

@ -60,6 +60,10 @@ public abstract class PlotManager {
public abstract boolean removeRoadSouth(PlotWorld plotworld, Plot plot);
public abstract boolean removeRoadSouthEast(PlotWorld plotworld, Plot plot);
public abstract boolean startPlotMerge(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
public abstract boolean startPlotUnlink(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
public abstract boolean finishPlotMerge(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);

View File

@ -65,6 +65,11 @@ public class Unlink extends SubCommand {
return false;
}
PlotManager manager = PlotMain.getPlotManager(world);
PlotWorld plotworld = PlotMain.getWorldSettings(world);
manager.startPlotUnlink(world, plotworld, ids);
for (PlotId id : ids) {
Plot myplot = PlotMain.getPlots(world).get(id);
@ -78,8 +83,7 @@ public class Unlink extends SubCommand {
myplot.settings.setMerged(new boolean[] { false, false, false, false });
DBFunc.setMerged(world.getName(), myplot, myplot.settings.getMerged());
}
PlotManager manager = PlotMain.getPlotManager(world);
PlotWorld plotworld = PlotMain.getWorldSettings(world);
for (int x = pos1.x; x <= pos2.x; x++) {
for (int y = pos1.y; y <= pos2.y; y++) {
boolean lx = x < pos2.x;

View File

@ -602,4 +602,14 @@ public class DefaultPlotManager extends PlotManager {
public boolean finishPlotUnlink(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds) {
return true;
}
@Override
public boolean startPlotMerge(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds) {
return true;
}
@Override
public boolean startPlotUnlink(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds) {
return true;
}
}