mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Fix stack trace when buying from sign when inventory full (#5761)
This commit is contained in:
parent
c85e179718
commit
c60ed56190
@ -46,7 +46,7 @@ public class SignBuy extends EssentialsSign {
|
||||
|
||||
charge.isAffordableFor(player);
|
||||
if (!items.pay(player)) {
|
||||
throw new ChargeException("Inventory full"); //TODO: TL
|
||||
throw new ChargeException("inventoryFull");
|
||||
}
|
||||
charge.charge(player);
|
||||
Trade.log("Sign", "Buy", "Interact", username, charge, username, items, sign.getBlock().getLocation(), player.getMoney(), ess);
|
||||
|
@ -72,7 +72,7 @@ public class SignTrade extends EssentialsSign {
|
||||
if (!trade.pay(player)) {
|
||||
subtractAmount(sign, 1, charge, ess);
|
||||
addAmount(sign, 2, trade, ess);
|
||||
throw new ChargeException("Full inventory");
|
||||
throw new ChargeException("inventoryFull");
|
||||
}
|
||||
charge.charge(player);
|
||||
Trade.log("Sign", "Trade", "Interact", sign.getLine(3).substring(2), charge, username, trade, sign.getBlock().getLocation(), player.getMoney(), ess);
|
||||
|
@ -561,6 +561,7 @@ inventoryClearingAllArmor=<primary>Cleared all inventory items and armor from<se
|
||||
inventoryClearingAllItems=<primary>Cleared all inventory items from<secondary> {0}<primary>.
|
||||
inventoryClearingFromAll=<primary>Clearing the inventory of all users...
|
||||
inventoryClearingStack=<primary>Removed<secondary> {0} <primary>of<secondary> {1} <primary>from<secondary> {2}<primary>.
|
||||
inventoryFull=<dark_red>Your inventory is full.
|
||||
invseeCommandDescription=See the inventory of other players.
|
||||
invseeCommandUsage=/<command> <player>
|
||||
invseeCommandUsage1=/<command> <player>
|
||||
|
Loading…
Reference in New Issue
Block a user