diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java index da2656f96..1f01ce2bc 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java @@ -412,13 +412,13 @@ public class ShopManager { if(space == -1) space=10000; if (space < amount) { - p.sendMessage(MsgUtil.getMessage("shop-has-no-space", "" + space, shop.getDataName())); + p.sendMessage(MsgUtil.getMessage("shop-has-no-space", "" + space, MsgUtil.getItemi18n(shop.getItem().getType().name()))); return; } int count = Util.countItems(p.getInventory(), shop.getItem()); // Not enough items if (amount > count) { - p.sendMessage(MsgUtil.getMessage("you-dont-have-that-many-items", "" + count, shop.getDataName())); + p.sendMessage(MsgUtil.getMessage("you-dont-have-that-many-items", "" + count, MsgUtil.getItemi18n(shop.getItem().getType().name()))); return; } if (amount == 0) { @@ -463,7 +463,7 @@ public class ShopManager { // Give them the money after we know we succeeded plugin.getEcon().deposit(p.getUniqueId(), total * (1 - tax)); // Notify the owner of the purchase. - String msg = MsgUtil.getMessage("player-sold-to-your-store", p.getName(), "" + amount, shop.getDataName()); + String msg = MsgUtil.getMessage("player-sold-to-your-store", p.getName(), "" + amount, MsgUtil.getItemi18n(shop.getItem().getType().name())); if (space == amount) msg += "\n" + MsgUtil.getMessage("shop-out-of-space", "" + shop.getLocation().getBlockX(), "" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ()); MsgUtil.send(shop.getOwner(), msg,shop.isUnlimited()); @@ -489,7 +489,7 @@ public class ShopManager { if(stock==-1) stock=10000; if (stock < amount) { - p.sendMessage(MsgUtil.getMessage("shop-stock-too-low", "" + shop.getRemainingStock(), shop.getDataName())); + p.sendMessage(MsgUtil.getMessage("shop-stock-too-low", "" + shop.getRemainingStock(), MsgUtil.getItemi18n(shop.getItem().getType().name()))); return; } if (amount == 0) { @@ -539,14 +539,14 @@ public class ShopManager { } // Notify the shop owner if (plugin.getConfig().getBoolean("show-tax")) { - String msg = MsgUtil.getMessage("player-bought-from-your-store-tax", p.getName(), "" + amount, shop.getDataName(), Util.format((tax * total))); + String msg = MsgUtil.getMessage("player-bought-from-your-store-tax", p.getName(), "" + amount, MsgUtil.getItemi18n(shop.getItem().getType().name()), Util.format((tax * total))); if (stock == amount) - msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(), "" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(), shop.getDataName()); + msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(), "" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(), MsgUtil.getItemi18n(shop.getItem().getType().name())); MsgUtil.send(shop.getOwner(), msg, shop.isUnlimited()); } else { - String msg = MsgUtil.getMessage("player-bought-from-your-store", p.getName(), "" + amount, shop.getDataName()); + String msg = MsgUtil.getMessage("player-bought-from-your-store", p.getName(), "" + amount, MsgUtil.getItemi18n(shop.getItem().getType().name())); if (stock == amount) - msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(), "" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(), shop.getDataName()); + msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(), "" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(), MsgUtil.getItemi18n(shop.getItem().getType().name())); MsgUtil.send(shop.getOwner(), msg, shop.isUnlimited()); } // Transfers the item from A to B