mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-25 12:45:48 +01:00
parent
73d1e514f4
commit
a6e51f7c85
@ -147,9 +147,14 @@ public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
||||
if (event.getBlocks().isEmpty()) {
|
||||
Location location = BlockUtil.getInstance().getBlockRelative(event.getBlock().getLocation(), event.getDirection());
|
||||
targetClaim = this.storage.getClaimAt(location, targetClaim);
|
||||
if (targetClaim.isWilderness()) {
|
||||
// Sticky pistons will attach to next block so we need to check it
|
||||
location = BlockUtil.getInstance().getBlockRelative(location, event.getDirection());
|
||||
targetClaim = this.storage.getClaimAt(location, targetClaim);
|
||||
if (targetClaim.isWilderness()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (handleBlockBreak(event, location, targetClaim, event.getBlock(), location.getBlock(), user, false)) {
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user