mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	jklasdklasdkml lk;as l;asd
This commit is contained in:
		@@ -492,18 +492,29 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
 | 
					    @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
 | 
				
			||||||
    public static void onStructureGrow(final StructureGrowEvent e) {
 | 
					    public static void onStructureGrow(final StructureGrowEvent e) {
 | 
				
			||||||
 | 
					        if (!isPlotWorld(e.getWorld().getName())) {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        final List<BlockState> blocks = e.getBlocks();
 | 
					        final List<BlockState> blocks = e.getBlocks();
 | 
				
			||||||
        boolean remove = false;
 | 
					        boolean remove = false;
 | 
				
			||||||
        for (int i = blocks.size() - 1; i >= 0; i--) {
 | 
					        for (int i = blocks.size() - 1; i >= 0; i--) {
 | 
				
			||||||
            if (remove || isPlotWorld(blocks.get(i).getLocation())) {
 | 
					            if (remove) {
 | 
				
			||||||
 | 
					                e.getBlocks().remove(i);
 | 
				
			||||||
                remove = true;
 | 
					                remove = true;
 | 
				
			||||||
                final Location loc = blocks.get(i).getLocation();
 | 
					 | 
				
			||||||
                if (!isInPlot(loc)) {
 | 
					                if (!isInPlot(loc)) {
 | 
				
			||||||
                    if (isPlotArea(loc)) {
 | 
					                    if (isPlotArea(loc)) {
 | 
				
			||||||
                        e.getBlocks().remove(i);
 | 
					                        e.getBlocks().remove(i);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            else {
 | 
				
			||||||
 | 
					                final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation());
 | 
				
			||||||
 | 
					                if (!isPlotArea(loc)) {
 | 
				
			||||||
 | 
					                    remove = true;
 | 
				
			||||||
 | 
					                    e.getBlocks().remove(i);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user