mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
@ -116,6 +116,7 @@ public class Auto extends SubCommand {
|
||||
if ((diff + (size_x * size_z)) > 0) {
|
||||
if (diff < 0) {
|
||||
MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS_NUM, (-diff) + "");
|
||||
return false;
|
||||
} else if (plr.hasPersistentMeta("grantedPlots")) {
|
||||
int grantedPlots = ByteArrayUtilities.bytesToInteger(plr.getPersistentMeta("grantedPlots"));
|
||||
if (grantedPlots - diff < size_x * size_z) {
|
||||
@ -133,6 +134,7 @@ public class Auto extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ((EconHandler.manager != null) && plotarea.USE_ECONOMY) {
|
||||
|
@ -769,25 +769,30 @@ public class Plot {
|
||||
final Runnable run = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (finished.incrementAndGet() >= plots.size()) {
|
||||
for (final RegionWrapper region : regions) {
|
||||
final Location[] corners = region.getCorners(Plot.this.area.worldname);
|
||||
ChunkManager.manager.clearAllEntities(corners[0], corners[1]);
|
||||
}
|
||||
TaskManager.runTask(whenDone);
|
||||
for (final RegionWrapper region : regions) {
|
||||
final Location[] corners = region.getCorners(Plot.this.area.worldname);
|
||||
ChunkManager.manager.clearAllEntities(corners[0], corners[1]);
|
||||
}
|
||||
TaskManager.runTask(whenDone);
|
||||
}
|
||||
};
|
||||
if (isDelete) {
|
||||
for (final Plot current : plots) {
|
||||
manager.unclaimPlot(Plot.this.area, current, run);
|
||||
manager.unclaimPlot(Plot.this.area, current, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (finished.incrementAndGet() >= plots.size()) {
|
||||
run.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
for (final Plot current : plots) {
|
||||
manager.claimPlot(Plot.this.area, current);
|
||||
}
|
||||
SetQueue.IMP.addTask(run);
|
||||
}
|
||||
SetQueue.IMP.addTask(run);
|
||||
return;
|
||||
}
|
||||
final Plot current = queue.poll();
|
||||
|
Reference in New Issue
Block a user