Skip to content

Commit 075b77d

Browse files
committed
Updated to support placeholders in display names
1 parent 698df74 commit 075b77d

File tree

1 file changed

+13
-13
lines changed
  • src/main/java/com/gmail/filoghost/chestcommands/api

1 file changed

+13
-13
lines changed

src/main/java/com/gmail/filoghost/chestcommands/api/Icon.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626

2727
public class Icon {
2828

29-
private Material material;
30-
private int amount;
31-
private short dataValue;
29+
private Material material;
30+
private int amount;
31+
private short dataValue;
3232

33-
private String name;
34-
private List<String> lore;
35-
private Map<Enchantment, Integer> enchantments;
36-
private Color color;
37-
private String skullOwner;
33+
private String name;
34+
private List<String> lore;
35+
private Map<Enchantment, Integer> enchantments;
36+
private Color color;
37+
private String skullOwner;
3838

39-
protected boolean closeOnClick;
40-
private ClickHandler clickHandler;
39+
protected boolean closeOnClick;
40+
private ClickHandler clickHandler;
4141

42-
private Set<Variable> nameVariables;
42+
private Set<Variable> nameVariables;
4343
private Map<Integer, Set<Variable>> loreVariables;
4444
// When there are no variables, we don't recreate the item.
45-
private ItemStack cachedItem;
45+
private ItemStack cachedItem;
4646

4747
public Icon() {
4848
enchantments = new HashMap<Enchantment, Integer>();
@@ -221,7 +221,7 @@ protected String calculateName(Player pov) {
221221
// Add a color to display the name empty.
222222
return ChatColor.WHITE.toString();
223223
} else {
224-
return name;
224+
return PlaceholderAPI.setPlaceholders(pov, name);
225225
}
226226
}
227227

0 commit comments

Comments
 (0)