mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Fixes #446
This commit is contained in:
parent
8a3f6c5eca
commit
02b2431f77
@ -127,14 +127,22 @@ public class Trim extends SubCommand {
|
|||||||
PS.get().TASK.cancelTask(Trim.TASK_ID);
|
PS.get().TASK.cancelTask(Trim.TASK_ID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Plot plot = plots.get(0);
|
final Plot plot = plots.remove(0);
|
||||||
plots.remove(0);
|
plots.remove(0);
|
||||||
final Location pos1 = MainUtil.getPlotBottomLoc(world, plot.id);
|
final Location pos1 = MainUtil.getPlotBottomLoc(world, plot.id);
|
||||||
final Location pos2 = MainUtil.getPlotTopLoc(world, plot.id);
|
final Location pos2 = MainUtil.getPlotTopLoc(world, plot.id);
|
||||||
for (int x = pos1.getX(); x <= pos2.getX(); x += 512 ) {
|
|
||||||
for (int z = pos1.getZ(); z <= pos2.getZ(); z += 512 ) {
|
int ccx1 = (pos1.getX() >> 9);
|
||||||
ChunkLoc chunk = ChunkManager.getChunkChunk(new Location(world, x, 0, z));
|
int ccz1 = (pos1.getZ() >> 9);
|
||||||
chunks.remove(chunk);
|
int ccx2 = (pos2.getX() >> 9);
|
||||||
|
int ccz2 = (pos2.getZ() >> 9);
|
||||||
|
|
||||||
|
System.out.print(pos1);
|
||||||
|
|
||||||
|
for(int x = ccx1; x <= ccx2; x++) {
|
||||||
|
for(int z = ccz1; z <= ccz2; z++) {
|
||||||
|
chunks.remove(new ChunkLoc(x, z));
|
||||||
|
System.out.print(x + "," + z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user