Send different message for not having enough items/money
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user