From f646d1283bc53d7fe54e6dcafe56ade91136868e Mon Sep 17 00:00:00 2001 From: Len <40720638+destro174@users.noreply.github.com> Date: Sun, 28 Aug 2022 20:47:05 +0200 Subject: [PATCH] Add placeholds to TransactionListener.java --- src/main/java/com/alttd/playershops/config/ShopTypeConfig.java | 2 +- .../com/alttd/playershops/listener/TransactionListener.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/alttd/playershops/config/ShopTypeConfig.java b/src/main/java/com/alttd/playershops/config/ShopTypeConfig.java index 0691c63..172f547 100644 --- a/src/main/java/com/alttd/playershops/config/ShopTypeConfig.java +++ b/src/main/java/com/alttd/playershops/config/ShopTypeConfig.java @@ -55,7 +55,7 @@ public class ShopTypeConfig { public String playerInventoryFull = "You do not have enough space in your inventory to buy from this shop."; public String playerNoFunds = "You do not have sufficient funds to trade with this shop."; - public String playerBought = "You bought (s) from for ."; + public String playerBought = "You bought (s) from for ."; public String shopSold = " bought (s) from you for ."; public String shopInventoryFull = "This shop does not have enough space in its inventory."; public String shopNoStock = "This shop is out of stock."; diff --git a/src/main/java/com/alttd/playershops/listener/TransactionListener.java b/src/main/java/com/alttd/playershops/listener/TransactionListener.java index 55b812e..4bb56ac 100644 --- a/src/main/java/com/alttd/playershops/listener/TransactionListener.java +++ b/src/main/java/com/alttd/playershops/listener/TransactionListener.java @@ -106,7 +106,8 @@ public class TransactionListener extends EventListener { TagResolver placeholders = TagResolver.resolver( Placeholder.unparsed("ownername", shop.getOwnerName()), Placeholder.unparsed("price", shop.getPrice() + ""), - Placeholder.unparsed("amount", shop.getAmount() + "") + Placeholder.unparsed("amount", shop.getAmount() + ""), + Placeholder.component("item", ShopUtil.itemNameComponent(shop.getItemStack())) ); if (transactionError != TransactionError.NONE) { switch (transactionError) {