diff --git a/src/main/java/com/alttd/GUI/windows/BuyGUI.java b/src/main/java/com/alttd/GUI/windows/BuyGUI.java index 433a62f..a813515 100644 --- a/src/main/java/com/alttd/GUI/windows/BuyGUI.java +++ b/src/main/java/com/alttd/GUI/windows/BuyGUI.java @@ -35,7 +35,8 @@ public class BuyGUI extends GUIMerchant { econUser.getPointsMap().get(villagerType.getName()), 0))) )), villagerType); - for (ItemStack itemStack : villagerType.getBuying()) { + for (ItemStack is : villagerType.getBuying()) { + ItemStack itemStack = is.clone(); if (bulk) itemStack.setAmount(itemStack.getMaxStackSize()); Price price = Utilities.getPrice(itemStack, WorthConfig.buy); @@ -96,7 +97,8 @@ public class BuyGUI extends GUIMerchant { .toLowerCase().replaceAll("_", " "))), Template.template("price", String.valueOf(cost)), Template.template("points", String.valueOf(transPts)), - Template.template("total_points", String.valueOf(newPoints)) + Template.template("total_points", String.valueOf(newPoints)), + Template.template("villager_name", villagerType.getDisplayName()) )); Bukkit.getServer().getPluginManager() diff --git a/src/main/java/com/alttd/GUI/windows/SellGUI.java b/src/main/java/com/alttd/GUI/windows/SellGUI.java index d005dfd..cf911eb 100644 --- a/src/main/java/com/alttd/GUI/windows/SellGUI.java +++ b/src/main/java/com/alttd/GUI/windows/SellGUI.java @@ -36,7 +36,8 @@ public class SellGUI extends GUIMerchant { Template.template("points", String.valueOf(Objects .requireNonNullElse(econUser.getPointsMap().get(villagerType.getName()) , 0))))), villagerType); - for (ItemStack itemStack : villagerType.getSelling()) { + for (ItemStack is : villagerType.getSelling()) { + ItemStack itemStack = is.clone(); if (bulk) itemStack.setAmount(1); Price price = Utilities.getPrice(itemStack, WorthConfig.sell); @@ -84,7 +85,8 @@ public class SellGUI extends GUIMerchant { .toLowerCase().replaceAll("_", " "))), Template.template("price", String.valueOf(cost)), Template.template("points", String.valueOf(transPts)), - Template.template("total_points", String.valueOf(newPoints)) + Template.template("total_points", String.valueOf(newPoints)), + Template.template("villager_name", villagerType.getDisplayName()) )); Bukkit.getServer().getPluginManager()