mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix #295
Fix #296 Former-commit-id: 3b2b2da1b0f43adf597bc7c34d987509eef05c41
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user