mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-13 23:11:20 +01:00
Fixed display and cache
This commit is contained in:
parent
91cbdde1e5
commit
bdb6da6d5b
@ -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;
|
||||
|
||||
|
@ -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(), "");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user