src/main/java/me/hyfe/simplespigot/text/Text.java
/**
     * Applies colours and replaces certain internally set placeholders on an item.
     *
     * @param itemStack The item to modify
     * @param replacer  The replacer to apply to the string.
     * @return An item which has been modified
     */
Applies colours and replaces certain internally set placeholders on an item.
@param itemStack The item to modify
@param replacer  The replacer to apply to the string.
@return An item which has been modified
Applies colours and replaces certain internally set placeholders on an item . @param itemStack The item to modify @param replacer The replacer to apply to the string . @return An item which has been modified
public static ItemStack modify(ItemStack itemStack, Replace replacer) {
        ItemStack mutableItem = itemStack.clone();
        ItemMeta itemMeta = mutableItem.getItemMeta();
        if (itemMeta == null) {
            return mutableItem;
        }
        itemMeta.setDisplayName(modify(itemMeta.getDisplayName(), replacer));
        itemMeta.setLore(modify(itemMeta.getLore(), replacer));
        mutableItem.setItemMeta(itemMeta);
        return mutableItem;
    }
public static ItemStack modify ( ItemStack itemStack , Replace replacer ) { ItemStack mutableItem = itemStack . clone ( ) ; ItemMeta itemMeta = mutableItem . getItemMeta ( ) ; if ( itemMeta == null ) { return mutableItem ; } itemMeta . setDisplayName ( modify ( itemMeta . getDisplayName ( ) , replacer ) ) ; itemMeta . setLore ( modify ( itemMeta . getLore ( ) , replacer ) ) ; mutableItem . setItemMeta ( itemMeta ) ; return mutableItem ; }
Applies colours and replaces certain internally set placeholders on an item.
Applies colours and replaces certain internally set placeholders on an item .