Fix icon caching

This commit is contained in:
filoghost 2020-08-15 17:29:56 +02:00
parent 862acff45c
commit 7fa48ac3c4

View File

@ -58,13 +58,17 @@ public abstract class BaseConfigurableIcon implements Icon {
}
protected boolean shouldCacheRendering() {
if (placeholdersEnabled) {
if (placeholdersEnabled && hasDynamicPlaceholders()) {
return false;
} else {
return true;
}
}
return (name == null || !name.hasDynamicPlaceholders())
&& (lore == null || !lore.hasDynamicPlaceholders())
&& (skullOwner == null || !skullOwner.hasDynamicPlaceholders());
private boolean hasDynamicPlaceholders() {
return (name != null && name.hasDynamicPlaceholders())
|| (lore != null && lore.hasDynamicPlaceholders())
|| (skullOwner != null && skullOwner.hasDynamicPlaceholders());
}
public void setMaterial(Material material) {