Compare commits

..

1 Commits

Author SHA1 Message Date
4bfc982fdc fix: allow pistons on merged plot road if detect-invalid-edge-pistons true
- fixes #4232
2023-12-03 14:17:37 +00:00
2 changed files with 6 additions and 4 deletions

View File

@ -7,16 +7,15 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
jdk: [ 17, 21 ]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Java ${{ matrix.jdk }}
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
java-version: 17
- name: Clean Build
run: ./gradlew clean build

View File

@ -261,7 +261,10 @@ public class BlockEventListener implements Listener {
final BlockFace facing = piston.getFacing();
location = location.add(facing.getModX(), facing.getModY(), facing.getModZ());
Plot newPlot = area.getOwnedPlotAbs(location);
if (!plot.equals(newPlot)) {
if (plot.equals(newPlot)) {
return;
}
if (!plot.isMerged() || !plot.getConnectedPlots().contains(newPlot)) {
event.setCancelled(true);
plot.debug("Prevented piston update because of invalid edge piston detection");
}