Skip to content

Commit

Permalink
fixed bazaar item colors
Browse files Browse the repository at this point in the history
  • Loading branch information
benfiratkaya committed Nov 30, 2023
1 parent 41b55b5 commit d90ad6d
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ public static void showGui(Player player, int itemAmount) {
XMaterial material = XMaterial.matchXMaterial(item);
String name = ItemUtil.getName(item);
String lore = (item.hasItemMeta() && item.getItemMeta().hasLore()) ?
item.getItemMeta().getLore().toString()
.replace("ı", "i")
.replace("u", "ü")
.replace("ş", "s")
.replace("ö", "o") : null;
String.join("\n", item.getItemMeta().getLore()) : null;
int amount = item.getAmount();
int maxDurability = item.getType().getMaxDurability();
int durability = ItemUtil.getDurability(item, maxDurability);
Expand All @@ -114,9 +110,9 @@ public static void showGui(Player player, int itemAmount) {

Map<String, String> body = new HashMap<>();
body.put("owner", userId);
body.put("name", ChatUtil.removeColorCode(name));
body.put("name", name);
if (lore != null)
body.put("lore", ChatUtil.removeColorCode(lore));
body.put("lore", lore);
body.put("amount", String.valueOf(amount));
body.put("maxDurability", String.valueOf(maxDurability));
body.put("durability", String.valueOf(durability));
Expand Down

0 comments on commit d90ad6d

Please sign in to comment.