mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 20:56:45 +01:00
Adding "entity-change-block" flag check for roads (#4527)
Adding check for plot flag
This commit is contained in:
parent
10bf45c128
commit
a42e08dc0e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user