mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Fixes container contents spillage on plot clear
TODO: fix component setting for ^
This commit is contained in:
		@@ -1401,6 +1401,7 @@ public class MainUtil {
 | 
			
		||||
    public static boolean clear(final Plot plot, final boolean isDelete, final Runnable whenDone) {
 | 
			
		||||
        if (!EventUtil.manager.callClear(plot.world, plot.id)) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final HashSet<RegionWrapper> regions = getRegions(plot);
 | 
			
		||||
        final HashSet<Plot> plots = getConnectedPlots(plot);
 | 
			
		||||
        final ArrayDeque<Plot> queue = new ArrayDeque<>(plots);
 | 
			
		||||
@@ -1416,6 +1417,10 @@ public class MainUtil {
 | 
			
		||||
                    final Runnable run = new Runnable() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public void run() {
 | 
			
		||||
                            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);
 | 
			
		||||
                            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user