Fixed display and cache

This commit is contained in:
Auxilor 2021-04-04 16:50:27 +01:00
parent 91cbdde1e5
commit bdb6da6d5b
2 changed files with 2 additions and 8 deletions

View File

@ -200,12 +200,6 @@ public class EnchantDisplay extends DisplayModule {
@Override
protected void revert(@NotNull final ItemStack itemStack) {
if (options.isRequireTarget()) {
if (!EnchantmentTarget.ALL.getMaterials().contains(itemStack.getType())) {
return;
}
}
ItemMeta meta = itemStack.getItemMeta();
assert meta != null;
@ -230,7 +224,7 @@ public class EnchantDisplay extends DisplayModule {
protected Object[] generateVarArgs(@NotNull final ItemStack itemStack) {
ItemMeta meta = itemStack.getItemMeta();
if (meta == null) {
return new Object[0];
return new Object[]{false};
}
boolean hideEnchants = false;

View File

@ -204,7 +204,7 @@ public class EnchantmentCache {
});
String processedStringDescription = descriptionBuilder.toString();
processedStringDescription = processedStringDescription.replace("§w", "");
processedStringDescription = processedStringDescription.replace(Display.PREFIX, "");
this.stringDescription = processedStringDescription.replaceAll(((EnchantDisplay) PLUGIN.getDisplayModule()).getOptions().getDescriptionOptions().getColor(), "");
}
}