Java Code Examples for org.bukkit.Color#YELLOW

The following examples show how to use org.bukkit.Color#YELLOW . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Loadout.java    From AnnihilationPro with MIT License 6 votes vote down vote up
private static ItemStack[] coloredArmor(AnniTeam team)
{
	Color c;
	if(team.getColor() == ChatColor.RED)
		c = Color.RED;
	else if(team.getColor() == ChatColor.BLUE)
		c = Color.BLUE;
	else if(team.getColor() == ChatColor.GREEN)
		c = Color.GREEN;
	else
		c = Color.YELLOW;
	ItemStack[] stacks = KitUtils.getLeatherArmor();
	for(ItemStack stack : stacks)
	{
		LeatherArmorMeta meta = (LeatherArmorMeta) stack.getItemMeta();
		meta.setColor(c);
		stack.setItemMeta(meta);
	}
	return stacks;
}
 
Example 2
Source File: Tools.java    From ce with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static Color fireworkColor(int i) {
    switch (i) {
    default:
    case 1:
        return Color.SILVER;
    case 2:
        return Color.AQUA;
    case 3:
        return Color.BLACK;
    case 4:
        return Color.BLUE;
    case 5:
        return Color.FUCHSIA;
    case 6:
        return Color.GRAY;
    case 7:
        return Color.GREEN;
    case 8:
        return Color.LIME;
    case 9:
        return Color.MAROON;
    case 10:
        return Color.NAVY;
    case 11:
        return Color.OLIVE;
    case 12:
        return Color.ORANGE;
    case 13:
        return Color.PURPLE;
    case 14:
        return Color.RED;
    case 15:
        return Color.YELLOW;
    case 16:
        return Color.TEAL;

    }
}
 
Example 3
Source File: ItemBuilder.java    From Crazy-Crates with MIT License 4 votes vote down vote up
private static Color getColor(String color) {
    if (color != null) {
        switch (color.toUpperCase()) {
            case "AQUA":
                return Color.AQUA;
            case "BLACK":
                return Color.BLACK;
            case "BLUE":
                return Color.BLUE;
            case "FUCHSIA":
                return Color.FUCHSIA;
            case "GRAY":
                return Color.GRAY;
            case "GREEN":
                return Color.GREEN;
            case "LIME":
                return Color.LIME;
            case "MAROON":
                return Color.MAROON;
            case "NAVY":
                return Color.NAVY;
            case "OLIVE":
                return Color.OLIVE;
            case "ORANGE":
                return Color.ORANGE;
            case "PURPLE":
                return Color.PURPLE;
            case "RED":
                return Color.RED;
            case "SILVER":
                return Color.SILVER;
            case "TEAL":
                return Color.TEAL;
            case "WHITE":
                return Color.WHITE;
            case "YELLOW":
                return Color.YELLOW;
        }
        try {
            String[] rgb = color.split(",");
            return Color.fromRGB(Integer.parseInt(rgb[0]), Integer.parseInt(rgb[1]), Integer.parseInt(rgb[2]));
        } catch (Exception ignore) {
        }
    }
    return null;
}
 
Example 4
Source File: FireworkShow.java    From CS-CoreLib with GNU General Public License v3.0 4 votes vote down vote up
public static Color[] getColors() {
	return new Color[] {Color.AQUA, Color.BLACK, Color.BLUE, Color.FUCHSIA, Color.GRAY, Color.GREEN, Color.LIME, Color.MAROON, Color.NAVY, Color.OLIVE, Color.ORANGE, Color.PURPLE, Color.RED, Color.SILVER, Color.TEAL, Color.WHITE, Color.YELLOW};
}