From 7ec812a3e13d955b9c4a32612abd45a7aca3fac4 Mon Sep 17 00:00:00 2001 From: Acrobot Date: Sat, 10 Sep 2011 20:50:24 +0200 Subject: [PATCH] - Added parenthesis. It fixes a bug with signs... --- com/Acrobot/ChestShop/Listeners/blockBreak.java | 6 ++++-- plugin.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/com/Acrobot/ChestShop/Listeners/blockBreak.java b/com/Acrobot/ChestShop/Listeners/blockBreak.java index ec82925..bbaf84b 100644 --- a/com/Acrobot/ChestShop/Listeners/blockBreak.java +++ b/com/Acrobot/ChestShop/Listeners/blockBreak.java @@ -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){} } } diff --git a/plugin.yml b/plugin.yml index a4b22a0..328e431 100644 --- a/plugin.yml +++ b/plugin.yml @@ -2,7 +2,7 @@ name: ChestShop main: com.Acrobot.ChestShop.ChestShop -version: 3.11 +version: 3.12 author: Acrobot