Skip to content

Commit

Permalink
Fixed an issue where the lore of items added from other plugins was d…
Browse files Browse the repository at this point in the history
…isplayed incorrectly
  • Loading branch information
7sat committed Mar 28, 2022
1 parent 1af4fb4 commit a6485d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.sat7</groupId>
<artifactId>DynamicShop</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<packaging>jar</packaging>

<name>DynamicShop</name>
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/me/sat7/dynamicshop/guis/Shop.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6485d3

Please sign in to comment.