Java Code Examples for org.bukkit.Color#SILVER

The following examples show how to use org.bukkit.Color#SILVER . 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: 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 2
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 3
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};
}