diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-05-19 01:21:21 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-05-19 01:21:21 +0100 |
commit | d76fe946b7f1f403da99a3ea4da9a02e55a35cda (patch) | |
tree | c7f05d912e759c10e689bec36c2013e03b2ba90d | |
parent | a738e49e3c73eba5a5b03ea0afe90ce139186cc5 (diff) | |
download | Essentials-d76fe946b7f1f403da99a3ea4da9a02e55a35cda.tar Essentials-d76fe946b7f1f403da99a3ea4da9a02e55a35cda.tar.gz Essentials-d76fe946b7f1f403da99a3ea4da9a02e55a35cda.tar.lz Essentials-d76fe946b7f1f403da99a3ea4da9a02e55a35cda.tar.xz Essentials-d76fe946b7f1f403da99a3ea4da9a02e55a35cda.zip |
Don't throw NPE on broken sign state, just allow block to break.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index 8f948bc3c..d89ffbed7 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -19,7 +19,6 @@ public class EssentialsSign { private static final Set<Material> EMPTY_SET = new HashSet<Material>(); protected static final BigDecimal MINTRANSACTION = new BigDecimal("0.01"); - protected transient final String signName; public EssentialsSign(final String signName) @@ -232,10 +231,17 @@ public class EssentialsSign final Block signblock = block.getRelative(blockFace); if (signblock.getType() == Material.WALL_SIGN) { - final org.bukkit.material.Sign signMat = (org.bukkit.material.Sign)signblock.getState().getData(); - if (signMat != null && signMat.getFacing() == blockFace && isValidSign(new BlockSign(signblock))) + try { - return true; + final org.bukkit.material.Sign signMat = (org.bukkit.material.Sign)signblock.getState().getData(); + if (signMat != null && signMat.getFacing() == blockFace && isValidSign(new BlockSign(signblock))) + { + return true; + } + } + catch (NullPointerException ex) + { + // Sometimes signs enter a state of being semi broken, having no text or state data, usually while burning. } } } |