From 3b94288434b1e55f64d264aa7d2cfda0017dc74f Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 4 Aug 2021 19:08:55 +0100 Subject: [PATCH] Fixed description wrapping --- .../java/com/willfp/ecoenchants/display/EnchantmentCache.java | 2 +- .../java/com/willfp/ecoenchants/enchantments/EcoEnchant.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/display/EnchantmentCache.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/display/EnchantmentCache.java index 473b0ed8..94791c8e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/display/EnchantmentCache.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/display/EnchantmentCache.java @@ -102,7 +102,7 @@ public class EnchantmentCache { EnchantmentRarity rarity; List description; if (enchantment instanceof EcoEnchant ecoEnchant) { - description = ecoEnchant.getWrappedDescription(); + description = StringUtils.formatList(ecoEnchant.getWrappedDescription()); name = ecoEnchant.getDisplayName(); type = ecoEnchant.getType(); rarity = ecoEnchant.getRarity(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java index 9bf08701..ab70b6b3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java @@ -206,8 +206,7 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche availableFromLoot = config.getBool(EcoEnchants.OBTAINING_LOCATION + "loot"); maxLevel = config.getInt(EcoEnchants.GENERAL_LOCATION + "maximum-level", 1); displayName = config.getString("name"); - description = config.getString("description"); - description = description.replace("§r", "§r" + this.getPlugin().getLangYml().getString("description-color")); + description = config.getString("description", false); disabledWorldNames.clear(); disabledWorldNames.addAll(config.getStrings(EcoEnchants.GENERAL_LOCATION + "disabled-in-worlds")); disabledWorlds.clear();