Compare commits

..

2 Commits

Author SHA1 Message Date
William B b959de5052
Merge 4109d17741 into c60ed56190 2024-04-18 23:38:52 -04:00
Emilia Kond c60ed56190
Fix stack trace when buying from sign when inventory full (#5761) 2024-04-13 21:50:45 +00:00
3 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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>