- Added parenthesis. It fixes a bug with signs...

This commit is contained in:
Acrobot 2011-09-10 20:50:24 +02:00
parent 9a914929d1
commit 7ec812a3e1
2 changed files with 5 additions and 3 deletions

View File

@ -33,7 +33,7 @@ public class blockBreak extends BlockListener {
}
private static boolean isCorrectSign(Sign sign, Block block) {
return sign != null && sign.getBlock() == block || getAttachedFace(sign) == block;
return sign != null && (sign.getBlock() == block || getAttachedFace(sign) == block);
}
private static Block getAttachedFace(Sign sign) {
@ -54,6 +54,8 @@ public class blockBreak extends BlockListener {
}
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
if (!uSign.isSign(event.getRetractLocation().getBlock()) && cancellingBlockBreak(event.getRetractLocation().getBlock(), null)) event.setCancelled(true);
try{
if (!uSign.isSign(event.getRetractLocation().getBlock()) && cancellingBlockBreak(event.getRetractLocation().getBlock(), null)) event.setCancelled(true);
} catch (Exception ignored){}
}
}

View File

@ -2,7 +2,7 @@ name: ChestShop
main: com.Acrobot.ChestShop.ChestShop
version: 3.11
version: 3.12
author: Acrobot