mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
parent
911bef974a
commit
5c4178b1dd
@ -288,6 +288,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
// Set the result data
|
||||
result.result = new short[16][];
|
||||
result.result_data = new byte[16][];
|
||||
result.grid = grid;
|
||||
// Catch any exceptions (as exceptions usually thrown
|
||||
try {
|
||||
// Fill the result data
|
||||
|
@ -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();
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user