package com.bitnix.dirtcryptostore.util;

import org.bukkit.ChatColor;

import java.util.ArrayList;
import java.util.List;

public final class ColorUtil {

    private ColorUtil() {
    }

    public static String color(String text) {
        if (text == null) {
            return "";
        }
        return ChatColor.translateAlternateColorCodes('&', text);
    }

    public static List<String> color(List<String> lines) {
        List<String> result = new ArrayList<>();
        if (lines == null) {
            return result;
        }

        for (String line : lines) {
            result.add(color(line));
        }
        return result;
    }
}
