From a6485d356f17b1647fc3b09367363b78221120ee Mon Sep 17 00:00:00 2001
From: 7sat <49030779+7sat@users.noreply.github.com>
Date: Mon, 28 Mar 2022 20:17:51 +0900
Subject: [PATCH] Fixed an issue where the lore of items added from other
plugins was displayed incorrectly
---
pom.xml | 2 +-
src/main/java/me/sat7/dynamicshop/guis/Shop.java | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index d5c0c0a..b27c7ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.sat7
DynamicShop
- 3.6.0
+ 3.6.1
jar
DynamicShop
diff --git a/src/main/java/me/sat7/dynamicshop/guis/Shop.java b/src/main/java/me/sat7/dynamicshop/guis/Shop.java
index ec8897f..1e6291c 100644
--- a/src/main/java/me/sat7/dynamicshop/guis/Shop.java
+++ b/src/main/java/me/sat7/dynamicshop/guis/Shop.java
@@ -248,7 +248,15 @@ private void ShowItems()
if (t(player, "SHOP.TRADE_LORE").length() > 0)
tradeLoreText = t(player, "SHOP.TRADE_LORE");
- String itemMetaLoreText = (meta != null && meta.hasLore()) ? meta.getLore().toString() : "";
+ String itemMetaLoreText = "";
+ if(meta != null && meta.hasLore())
+ {
+ for(String tempLore : meta.getLore())
+ {
+ itemMetaLoreText += tempLore + "\n";
+ }
+ itemMetaLoreText = itemMetaLoreText.substring(0, itemMetaLoreText.length() - 2);
+ }
lore = lore.replace("{\\nBuy}", buyText.isEmpty() ? "" : "\n" + buyText);
lore = lore.replace("{\\nSell}", sellText.isEmpty() ? "" : "\n" + sellText);