Fix #296


Former-commit-id: 3b2b2da1b0f43adf597bc7c34d987509eef05c41
This commit is contained in:
Ghost_chu committed 2020-01-16 17:51:21 +08:00
1 parent 0fd7e00738
commit 2d0a62bb75
1 file changed
+8
@@ -158,6 +158,10 @@ public class PlayerListener implements Listener {
itemAmount = Math.min(itemAmount, shop.getRemainingStock());
}
if(itemAmount < 0){
itemAmount = 0;
}
p.sendMessage(MsgUtil.getMessage("how-many-buy", p, "" + itemAmount));
} else {
final double ownerBalance = eco.getBalance(shop.getOwner());
@@ -175,6 +179,10 @@ public class PlayerListener implements Listener {
items = Math.min(items, ownerCanAfford);
}
if(items < 0){
items = 0;
}
p.sendMessage(MsgUtil.getMessage("how-many-sell", p, "" + items));
}
// Add the new action