mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-23 02:25:26 +01:00
Fix icon caching
This commit is contained in:
parent
862acff45c
commit
7fa48ac3c4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user