mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
fix: allow pistons on merged plot road if detect-invalid-edge-pistons true
- fixes #4232
This commit is contained in:
parent
1a18adcd95
commit
4bfc982fdc
@ -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