mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-01 17:36:45 +01:00
Fixes container contents spillage on plot clear
TODO: fix component setting for ^
This commit is contained in:
parent
f2431c869f
commit
74a967b535
@ -1401,6 +1401,7 @@ public class MainUtil {
|
|||||||
if (!EventUtil.manager.callClear(plot.world, plot.id)) {
|
if (!EventUtil.manager.callClear(plot.world, plot.id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
final HashSet<RegionWrapper> regions = getRegions(plot);
|
||||||
final HashSet<Plot> plots = getConnectedPlots(plot);
|
final HashSet<Plot> plots = getConnectedPlots(plot);
|
||||||
final ArrayDeque<Plot> queue = new ArrayDeque<>(plots);
|
final ArrayDeque<Plot> queue = new ArrayDeque<>(plots);
|
||||||
removeSign(plot);
|
removeSign(plot);
|
||||||
@ -1416,6 +1417,10 @@ public class MainUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (finished.incrementAndGet() >= plots.size()) {
|
if (finished.incrementAndGet() >= plots.size()) {
|
||||||
|
for (RegionWrapper region : regions) {
|
||||||
|
Location[] corners = getCorners(plot.world, region);
|
||||||
|
ChunkManager.manager.clearAllEntities(corners[0], corners[1]);
|
||||||
|
}
|
||||||
TaskManager.runTask(whenDone);
|
TaskManager.runTask(whenDone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user