diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Block/Break/SignBreak.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Block/Break/SignBreak.java index 7bc3272..1b7f8a5 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Block/Break/SignBreak.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Block/Break/SignBreak.java @@ -26,6 +26,7 @@ import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.material.Directional; import org.bukkit.material.PistonBaseMaterial; import org.bukkit.metadata.FixedMetadataValue; +import org.bukkit.metadata.MetadataValue; import java.util.ArrayList; import java.util.Arrays; @@ -58,6 +59,12 @@ public class SignBreak implements Listener { Block attachedBlock = BlockUtil.getAttachedFace(sign); if (attachedBlock.getType() == Material.AIR && ChestShopSign.isValid(sign)) { + List values = block.getMetadata(METADATA_NAME); + + if (values.size() < 1) { + return; + } + sendShopDestroyedEvent(sign, (Player) block.getMetadata(METADATA_NAME).get(0).value()); } }