mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-25 12:45:48 +01:00
parent
73d1e514f4
commit
a6e51f7c85
@ -148,7 +148,12 @@ public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
|||||||
Location location = BlockUtil.getInstance().getBlockRelative(event.getBlock().getLocation(), event.getDirection());
|
Location location = BlockUtil.getInstance().getBlockRelative(event.getBlock().getLocation(), event.getDirection());
|
||||||
targetClaim = this.storage.getClaimAt(location, targetClaim);
|
targetClaim = this.storage.getClaimAt(location, targetClaim);
|
||||||
if (targetClaim.isWilderness()) {
|
if (targetClaim.isWilderness()) {
|
||||||
return;
|
// 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)) {
|
if (handleBlockBreak(event, location, targetClaim, event.getBlock(), location.getBlock(), user, false)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user