mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-23 07:11:20 +01:00
Fix ShopDestroyEvent not getting called in certain cases
This could be triggered by updating a column of physics blocks with a shop attached
This commit is contained in:
parent
be5f47cb1f
commit
2007c4a7fb
@ -53,11 +53,9 @@ public class SignBreak implements Listener {
|
||||
Block attachedBlock = BlockUtil.getAttachedBlock(sign);
|
||||
|
||||
if (attachedBlock.getType() == Material.AIR && ChestShopSign.isValid(sign)) {
|
||||
if (!block.hasMetadata(METADATA_NAME)) {
|
||||
return;
|
||||
}
|
||||
|
||||
sendShopDestroyedEvent(sign, (Player) block.getMetadata(METADATA_NAME).get(0).value());
|
||||
sendShopDestroyedEvent(sign, block.hasMetadata(METADATA_NAME)
|
||||
? (Player) block.getMetadata(METADATA_NAME).get(0).value()
|
||||
: null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user