From a4fdc30e17c22c775247c05ed0983e7f19932e90 Mon Sep 17 00:00:00 2001 From: Andrzej Pomirski Date: Wed, 13 Aug 2014 17:23:11 +0200 Subject: [PATCH] Add an additional "%buyer" tag to the out of stock message --- .../Listeners/PreTransaction/ErrorMessageSender.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java b/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java index 5497d03..1444531 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java @@ -53,7 +53,9 @@ public class ErrorMessageSender implements Listener { message = Messages.NOT_ENOUGH_ITEMS_TO_SELL; break; case NOT_ENOUGH_STOCK_IN_CHEST: - String messageOutOfStock = Messages.prefix(NOT_ENOUGH_STOCK_IN_YOUR_SHOP).replace("%material", getItemNames(event.getStock())); + String messageOutOfStock = Messages.prefix(NOT_ENOUGH_STOCK_IN_YOUR_SHOP) + .replace("%material", getItemNames(event.getStock())) + .replace("%buyer", event.getClient().getName()); sendMessageToOwner(event.getOwner(), messageOutOfStock); message = Messages.NOT_ENOUGH_STOCK; break;