Compare commits
3 Commits
da0d7c356c
...
a5b97507bb
Author | SHA1 | Date |
---|---|---|
Traks | a5b97507bb | |
renovate[bot] | c57d784df7 | |
Traks | a9f68eb351 |
|
@ -989,6 +989,13 @@ public class BlockEventListener implements Listener {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (block.getType() == Material.MOVING_PISTON
|
||||
&& event.getBlocks().isEmpty()
|
||||
&& location.add(relative.getBlockX(), relative.getBlockY(), relative.getBlockZ()).isPlotArea()) {
|
||||
// Headless sticky pistons can delete the block in front of them
|
||||
// when retracting. Prevent this.
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
Plot plot = area.getOwnedPlot(location);
|
||||
|
@ -1012,6 +1019,13 @@ public class BlockEventListener implements Listener {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (block.getType() == Material.MOVING_PISTON
|
||||
&& event.getBlocks().isEmpty()
|
||||
&& !plot.equals(area.getOwnedPlot(location.add(relative.getBlockX(), relative.getBlockY(), relative.getBlockZ())))) {
|
||||
// Headless sticky pistons can delete the block in front of them
|
||||
// when retracting. Prevent this.
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
|
|
|
@ -37,7 +37,7 @@ shadow = "8.1.1"
|
|||
grgit = "4.1.1"
|
||||
spotless = "6.25.0"
|
||||
nexus = "2.0.0"
|
||||
runPaper = "2.2.3"
|
||||
runPaper = "2.2.4"
|
||||
|
||||
[libraries]
|
||||
# Platform expectations
|
||||
|
|
Loading…
Reference in New Issue