mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Fixed bug
This commit is contained in:
parent
568fdf75e9
commit
673becb3e7
@ -145,13 +145,12 @@ public class EnchantmentCache {
|
|||||||
|
|
||||||
description.replaceAll(line -> Display.PREFIX + PLUGIN.getDisplayModule().getOptions().getDescriptionOptions().getColor() + line);
|
description.replaceAll(line -> Display.PREFIX + PLUGIN.getDisplayModule().getOptions().getDescriptionOptions().getColor() + line);
|
||||||
|
|
||||||
|
|
||||||
Map<Integer, List<String>> levelDescription = new HashMap<>();
|
Map<Integer, List<String>> levelDescription = new HashMap<>();
|
||||||
|
|
||||||
if (enchantment instanceof EcoEnchant ecoEnchant) {
|
if (enchantment instanceof EcoEnchant ecoEnchant) {
|
||||||
for (int i = 1; i <= ecoEnchant.getMaxLevel(); i++) {
|
for (int i = 1; i <= ecoEnchant.getMaxLevel(); i++) {
|
||||||
List<String> levelDesc = new ArrayList<>();
|
List<String> levelDesc = new ArrayList<>();
|
||||||
for (String s : ecoEnchant.getWrappedDescription()) {
|
for (String s : description) {
|
||||||
levelDesc.add(s.replace("%value%", ecoEnchant.getPlaceholder(i)));
|
levelDesc.add(s.replace("%value%", ecoEnchant.getPlaceholder(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +168,6 @@ public class EnchantmentCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ToString
|
@ToString
|
||||||
@SuppressWarnings("DeprecatedIsStillUsed")
|
|
||||||
public static final class CacheEntry {
|
public static final class CacheEntry {
|
||||||
/**
|
/**
|
||||||
* The enchantment that this cache is for.
|
* The enchantment that this cache is for.
|
||||||
@ -250,7 +248,9 @@ public class EnchantmentCache {
|
|||||||
if (description == null) {
|
if (description == null) {
|
||||||
if (enchantment instanceof EcoEnchant enchant) {
|
if (enchantment instanceof EcoEnchant enchant) {
|
||||||
List<String> levelDesc = new ArrayList<>();
|
List<String> levelDesc = new ArrayList<>();
|
||||||
for (String s : enchant.getWrappedDescription()) {
|
List<String> defDesc = enchant.getWrappedDescription();
|
||||||
|
defDesc.replaceAll(line -> Display.PREFIX + PLUGIN.getDisplayModule().getOptions().getDescriptionOptions().getColor() + line);
|
||||||
|
for (String s : defDesc) {
|
||||||
levelDesc.add(s.replace("%value%", enchant.getPlaceholder(level)));
|
levelDesc.add(s.replace("%value%", enchant.getPlaceholder(level)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user