From 8fb0a649a6f2242e2068697f2f520cfddb4b622f Mon Sep 17 00:00:00 2001 From: Niklas Eicker Date: Thu, 11 Feb 2021 19:17:45 +0100 Subject: [PATCH] Remove hardcoded lines in additional shop item lore --- changelog.md | 4 ++++ pom.xml | 2 +- .../me/nikl/gamebox/inventory/shop/Category.java | 3 --- src/main/resources/tokenShop.yml | 12 ++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 2f71844..9296748 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 3.3.0 +- Removed hardcoded parts in additional lore for shop items + - the default items where adapted to include the previously hardcoded lines + ## 3.2.0 - extend GameRuleMultiRewards to support CookieClicker rewards diff --git a/pom.xml b/pom.xml index ff9b4da..67f80a2 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ gamebox GameBox jar - 3.2.0 + 3.3.0 Collection of inventory games https://gamebox.nikl.me diff --git a/src/main/java/me/nikl/gamebox/inventory/shop/Category.java b/src/main/java/me/nikl/gamebox/inventory/shop/Category.java index 2e21465..7b51d0b 100644 --- a/src/main/java/me/nikl/gamebox/inventory/shop/Category.java +++ b/src/main/java/me/nikl/gamebox/inventory/shop/Category.java @@ -193,9 +193,6 @@ private ItemStack getButtonItem(ItemStack itemStack, ConfigurationSection pageSe } if (pageSection.isList(path + ".additionalLore")) { List lore = new ArrayList<>(); - lore.add(" "); - lore.add(ChatColor.GOLD + "- - - - - - - - - - - - - - - - - - -"); - lore.add(" "); List addLore = new ArrayList<>(pageSection.getStringList(path + ".additionalLore")); for (int i = 0; i < addLore.size(); i++) { addLore.set(i, StringUtility.color(addLore.get(i))); diff --git a/src/main/resources/tokenShop.yml b/src/main/resources/tokenShop.yml index 6e4e045..6762524 100644 --- a/src/main/resources/tokenShop.yml +++ b/src/main/resources/tokenShop.yml @@ -85,6 +85,9 @@ shop: # optional lore added to the default shop lore that already contains the price of the item/command additionalLore: + - "" + - "&6- - - - - - - - - - - - - - - - - - -" + - "" - "&bPersonal greeting by the server" - "" - "&bHave the permissions:" @@ -131,6 +134,9 @@ shop: tokens: 1 buttonItem: additionalLore: + - "" + - "&6- - - - - - - - - - - - - - - - - - -" + - "" - "&bYou need the following permission" - "&b to buy this item:" - " " @@ -154,6 +160,9 @@ shop: materialData: "nether_star" displayName: "&9&lExample Command" additionalLore: + - "" + - "&6- - - - - - - - - - - - - - - - - - -" + - "" - "&bIf you buy this, the server" - "&b will thank you ;)" - " " @@ -180,6 +189,9 @@ shop: materialData: "obsidian" displayName: "&9&lExample give Command" additionalLore: + - "" + - "&6- - - - - - - - - - - - - - - - - - -" + - "" - "&bGives you 59 obsidian per command" - " &bIf you have the perm." - " &6my.server.builder"