Fix plot move

This commit is contained in:
Jesse Boyd 2016-03-29 18:09:40 +11:00
parent 9bd3f2cbfd
commit ef4438889b

View File

@ -2737,14 +2737,19 @@ public class Plot {
TaskManager.runTask(whenDone); TaskManager.runTask(whenDone);
return; return;
} }
Runnable task = this; final Runnable task = this;
RegionWrapper region = regions.poll(); RegionWrapper region = regions.poll();
Location[] corners = region.getCorners(Plot.this.area.worldname); Location[] corners = region.getCorners(Plot.this.area.worldname);
Location pos1 = corners[0]; final Location pos1 = corners[0];
Location pos2 = corners[1]; final Location pos2 = corners[1];
Location newPos = pos1.clone().add(offsetX, 0, offsetZ); Location newPos = pos1.clone().add(offsetX, 0, offsetZ);
newPos.setWorld(destination.area.worldname); newPos.setWorld(destination.area.worldname);
ChunkManager.manager.regenerateRegion(pos1, pos2, false, task); ChunkManager.manager.copyRegion(pos1, pos2, newPos, new Runnable() {
@Override
public void run() {
ChunkManager.manager.regenerateRegion(pos1, pos2, false, task);
}
});
} }
}; };
Runnable swap = new Runnable() { Runnable swap = new Runnable() {