mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 19:50:38 +00:00
Fixes container contents spillage on plot clear
TODO: fix component setting for ^
This commit is contained in:
parent
f2431c869f
commit
74a967b535
2 changed files with 5 additions and 0 deletions
|
@ -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 a new issue