Add an additional "%buyer" tag to the out of stock message

This commit is contained in:
Andrzej Pomirski 2014-08-13 17:23:11 +02:00
parent c646dd16a0
commit a4fdc30e17

View File

@ -53,7 +53,9 @@ public class ErrorMessageSender implements Listener {
message = Messages.NOT_ENOUGH_ITEMS_TO_SELL; message = Messages.NOT_ENOUGH_ITEMS_TO_SELL;
break; break;
case NOT_ENOUGH_STOCK_IN_CHEST: 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); sendMessageToOwner(event.getOwner(), messageOutOfStock);
message = Messages.NOT_ENOUGH_STOCK; message = Messages.NOT_ENOUGH_STOCK;
break; break;