mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
fixes
This commit is contained in:
parent
42a3ec0561
commit
66d596b993
@ -106,6 +106,8 @@ public class PlotHelper {
|
||||
|
||||
manager.startPlotMerge(world, plotworld, plotIds);
|
||||
|
||||
boolean result = false;
|
||||
|
||||
for (int x = pos1.x; x <= pos2.x; x++) {
|
||||
for (int y = pos1.y; y <= pos2.y; y++) {
|
||||
|
||||
@ -142,13 +144,14 @@ public class PlotHelper {
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
result = true;
|
||||
DBFunc.setMerged(world.getName(), plot, plot.settings.getMerged());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
manager.finishPlotMerge(world, plotworld, plotIds);
|
||||
return true;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -315,35 +318,49 @@ public class PlotHelper {
|
||||
|
||||
ArrayList<PlotId> plots;
|
||||
boolean merge = true;
|
||||
int count = 0;
|
||||
while (merge) {
|
||||
if (count>16) {
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
PlotId bot = PlayerFunctions.getBottomPlot(world, plot).id;
|
||||
PlotId top = PlayerFunctions.getTopPlot(world, plot).id;
|
||||
merge = false;
|
||||
plots = PlayerFunctions.getPlotSelectionIds(world, new PlotId(bot.x, bot.y - 1), new PlotId(top.x, top.y));
|
||||
if (ownsPlots(world, plots, player, 0)) {
|
||||
boolean result = mergePlots(world, plots);
|
||||
if (result) {
|
||||
merge = true;
|
||||
mergePlots(world, plots);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
plots = PlayerFunctions.getPlotSelectionIds(world, new PlotId(bot.x, bot.y), new PlotId(top.x + 1, top.y));
|
||||
if (ownsPlots(world, plots, player, 1)) {
|
||||
boolean result = mergePlots(world, plots);
|
||||
if (result) {
|
||||
merge = true;
|
||||
mergePlots(world, plots);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
plots = PlayerFunctions.getPlotSelectionIds(world, new PlotId(bot.x, bot.y), new PlotId(top.x, top.y + 1));
|
||||
if (ownsPlots(world, plots, player, 2)) {
|
||||
boolean result = mergePlots(world, plots);
|
||||
if (result) {
|
||||
merge = true;
|
||||
mergePlots(world, plots);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
plots = PlayerFunctions.getPlotSelectionIds(world, new PlotId(bot.x - 1, bot.y), new PlotId(top.x, top.y));
|
||||
if (ownsPlots(world, plots, player, 3)) {
|
||||
boolean result = mergePlots(world, plots);
|
||||
if (result) {
|
||||
merge = true;
|
||||
mergePlots(world, plots);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
merge = false;
|
||||
}
|
||||
if (canSetFast) {
|
||||
SetBlockFast.update(player);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class PlotId {
|
||||
return false;
|
||||
}
|
||||
PlotId other = (PlotId) obj;
|
||||
return ((this.x == other.x) && (this.y == other.y));
|
||||
return (((int) this.x == (int) other.x) && ((int) this.y == (int) other.y));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,7 +119,7 @@ public class Auto extends SubCommand {
|
||||
if ((z < q) && ((z - x) < q)) {
|
||||
z++;
|
||||
}
|
||||
else
|
||||
else {
|
||||
if (x < q) {
|
||||
x++;
|
||||
z = q - 100;
|
||||
@ -131,6 +131,7 @@ public class Auto extends SubCommand {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (!br) {
|
||||
PlotId start = new PlotId(x, z);
|
||||
|
Loading…
Reference in New Issue
Block a user