mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-28 22:47:46 +02:00
- Fixed block destruction
This commit is contained in:
parent
06ff63ecfd
commit
353dacf1a0
@ -32,7 +32,7 @@ public class blockBreak extends BlockListener {
|
|||||||
|
|
||||||
if (restrictedSign(block)) return true; //If the block is a restricted sign (and the player is not an admin/mod)
|
if (restrictedSign(block)) return true; //If the block is a restricted sign (and the player is not an admin/mod)
|
||||||
|
|
||||||
Sign sign = uBlock.findSign(block, uLongName.stripName(player.getName()));
|
Sign sign = uBlock.findSign(block, (player != null ? uLongName.stripName(player.getName()) : null));
|
||||||
if (!isCorrectSign(sign, block)) return false; //It's not a correct shop sign, so don't cancel it
|
if (!isCorrectSign(sign, block)) return false; //It's not a correct shop sign, so don't cancel it
|
||||||
if (playerIsNotOwner(player, sign)) return true; //Player is not the owner of the shop - cancel!
|
if (playerIsNotOwner(player, sign)) return true; //Player is not the owner of the shop - cancel!
|
||||||
if (weShouldReturnMoney()) Economy.add(uLongName.getName(sign.getLine(0)), Config.getFloat(Property.SHOP_REFUND_PRICE)); //Add some money
|
if (weShouldReturnMoney()) Economy.add(uLongName.getName(sign.getLine(0)), Config.getFloat(Property.SHOP_REFUND_PRICE)); //Add some money
|
||||||
|
@ -2,7 +2,7 @@ name: ChestShop
|
|||||||
|
|
||||||
main: com.Acrobot.ChestShop.ChestShop
|
main: com.Acrobot.ChestShop.ChestShop
|
||||||
|
|
||||||
version: 3.28
|
version: 3.29
|
||||||
|
|
||||||
|
|
||||||
author: Acrobot
|
author: Acrobot
|
||||||
|
Loading…
Reference in New Issue
Block a user