mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
fix: allow pistons on merged plot road if detect-invalid-edge-pistons true (#4257)
- fixes #4232
This commit is contained in:
parent
1991142d48
commit
ead7acdd76
@ -261,7 +261,10 @@ public class BlockEventListener implements Listener {
|
|||||||
final BlockFace facing = piston.getFacing();
|
final BlockFace facing = piston.getFacing();
|
||||||
location = location.add(facing.getModX(), facing.getModY(), facing.getModZ());
|
location = location.add(facing.getModX(), facing.getModY(), facing.getModZ());
|
||||||
Plot newPlot = area.getOwnedPlotAbs(location);
|
Plot newPlot = area.getOwnedPlotAbs(location);
|
||||||
if (!plot.equals(newPlot)) {
|
if (plot.equals(newPlot)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!plot.isMerged() || !plot.getConnectedPlots().contains(newPlot)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
plot.debug("Prevented piston update because of invalid edge piston detection");
|
plot.debug("Prevented piston update because of invalid edge piston detection");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user