Skip to content

Commit

Permalink
Updated to support placeholders in display names
Browse files Browse the repository at this point in the history
  • Loading branch information
foxfirecodes committed Feb 21, 2017
1 parent 698df74 commit 075b77d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/java/com/gmail/filoghost/chestcommands/api/Icon.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@

public class Icon {

private Material material;
private int amount;
private short dataValue;
private Material material;
private int amount;
private short dataValue;

private String name;
private List<String> lore;
private Map<Enchantment, Integer> enchantments;
private Color color;
private String skullOwner;
private String name;
private List<String> lore;
private Map<Enchantment, Integer> enchantments;
private Color color;
private String skullOwner;

protected boolean closeOnClick;
private ClickHandler clickHandler;
protected boolean closeOnClick;
private ClickHandler clickHandler;

private Set<Variable> nameVariables;
private Set<Variable> nameVariables;
private Map<Integer, Set<Variable>> loreVariables;
// When there are no variables, we don't recreate the item.
private ItemStack cachedItem;
private ItemStack cachedItem;

public Icon() {
enchantments = new HashMap<Enchantment, Integer>();
Expand Down Expand Up @@ -221,7 +221,7 @@ protected String calculateName(Player pov) {
// Add a color to display the name empty.
return ChatColor.WHITE.toString();
} else {
return name;
return PlaceholderAPI.setPlaceholders(pov, name);
}
}

Expand Down

0 comments on commit 075b77d

Please sign in to comment.