Send different message for not having enough items/money

This commit is contained in:
Stijn
2022-08-31 20:00:36 +02:00
parent ad656391fb
commit 2228e45ed4
4 changed files with 9 additions and 1 deletions
@@ -252,7 +252,7 @@ public class PlayerShop {
int playerItems = InventoryUtils.countItems(player.getInventory(), itemStack);
if (playerItems < itemStack.getAmount())
return TransactionError.INSUFFICIENT_FUNDS_PLAYER;
return TransactionError.INSUFFICIENT_ITEMS_PLAYER;
boolean hasFunds = EconomyUtils.hasSufficientFunds(this, price);
if (!hasFunds)
@@ -4,6 +4,7 @@ public enum TransactionError {
CANCELLED,
INSUFFICIENT_FUNDS_SHOP,
INSUFFICIENT_FUNDS_PLAYER,
INSUFFICIENT_ITEMS_PLAYER,
INVENTORY_FULL_SHOP,
INVENTORY_FULL_PLAYER,
PLAYER_OFFLINE,