mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Adding "entity-change-block" flag check for roads (#4527)
Adding check for plot flag
This commit is contained in:
		@@ -401,7 +401,13 @@ public class EntityEventListener implements Listener {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Plot plot = area.getOwnedPlot(location);
 | 
			
		||||
        if (plot != null && !plot.getFlag(EntityChangeBlockFlag.class)) {
 | 
			
		||||
        if (plot == null) {
 | 
			
		||||
            if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EntityChangeBlockFlag.class, false)) {
 | 
			
		||||
                event.setCancelled(true);
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (!plot.getFlag(EntityChangeBlockFlag.class)) {
 | 
			
		||||
            plot.debug(e.getType() + " could not change block because entity-change-block = false");
 | 
			
		||||
            event.setCancelled(true);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user