當前位置: 首頁>>代碼示例>>Java>>正文


Java TextColors.BLUE屬性代碼示例

本文整理匯總了Java中org.spongepowered.api.text.format.TextColors.BLUE屬性的典型用法代碼示例。如果您正苦於以下問題:Java TextColors.BLUE屬性的具體用法?Java TextColors.BLUE怎麽用?Java TextColors.BLUE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.spongepowered.api.text.format.TextColors的用法示例。


在下文中一共展示了TextColors.BLUE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTextColorByName

public static TextColor getTextColorByName(String textColorName, TextColor fallbackColor) {
    if (TextColors.AQUA.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.AQUA;
    } else if (TextColors.BLACK.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.BLACK;
    } else if (TextColors.BLUE.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.BLUE;
    } else if (TextColors.DARK_AQUA.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_AQUA;
    } else if (TextColors.DARK_BLUE.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_BLUE;
    } else if (TextColors.DARK_GRAY.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_GRAY;
    } else if (TextColors.DARK_GREEN.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_GREEN;
    } else if (TextColors.DARK_PURPLE.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_PURPLE;
    } else if (TextColors.DARK_RED.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.DARK_RED;
    } else if (TextColors.GOLD.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.GOLD;
    } else if (TextColors.GRAY.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.GRAY;
    } else if (TextColors.GREEN.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.GREEN;
    } else if (TextColors.LIGHT_PURPLE.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.LIGHT_PURPLE;
    } else if (TextColors.RED.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.RED;
    } else if (TextColors.WHITE.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.WHITE;
    } else if (TextColors.YELLOW.getName().equalsIgnoreCase(textColorName)) {
        return TextColors.YELLOW;
    } else {
        return fallbackColor;
    }
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:37,代碼來源:Utils.java

示例2: getTextColorById

public static TextColor getTextColorById(String textColorId, TextColor fallbackColor) {
    if (TextColors.AQUA.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.AQUA;
    } else if (TextColors.BLACK.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.BLACK;
    } else if (TextColors.BLUE.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.BLUE;
    } else if (TextColors.DARK_AQUA.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_AQUA;
    } else if (TextColors.DARK_BLUE.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_BLUE;
    } else if (TextColors.DARK_GRAY.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_GRAY;
    } else if (TextColors.DARK_GREEN.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_GREEN;
    } else if (TextColors.DARK_PURPLE.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_PURPLE;
    } else if (TextColors.DARK_RED.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.DARK_RED;
    } else if (TextColors.GOLD.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.GOLD;
    } else if (TextColors.GRAY.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.GRAY;
    } else if (TextColors.GREEN.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.GREEN;
    } else if (TextColors.LIGHT_PURPLE.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.LIGHT_PURPLE;
    } else if (TextColors.RED.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.RED;
    } else if (TextColors.WHITE.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.WHITE;
    } else if (TextColors.YELLOW.getId().equalsIgnoreCase(textColorId)) {
        return TextColors.YELLOW;
    } else {
        return fallbackColor;
    }
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:37,代碼來源:Utils.java

示例3: getColor

private static TextColor getColor(char c) {
    switch (c) {
        case '0':
            return TextColors.BLACK;
        case '1':
            return TextColors.DARK_BLUE;
        case '2':
            return TextColors.DARK_GREEN;
        case '3':
            return TextColors.DARK_AQUA;
        case '4':
            return TextColors.DARK_RED;
        case '5':
            return TextColors.DARK_PURPLE;
        case '6':
            return TextColors.GOLD;
        case '7':
            return TextColors.GRAY;
        case '8':
            return TextColors.DARK_GRAY;
        case '9':
            return TextColors.BLUE;
        case 'a':
            return TextColors.GREEN;
        case 'b':
            return TextColors.AQUA;
        case 'c':
            return TextColors.RED;
        case 'd':
            return TextColors.LIGHT_PURPLE;
        case 'e':
            return TextColors.YELLOW;
        case 'f':
            return TextColors.WHITE;
        default:
            return null;
    }
}
 
開發者ID:MinecraftMarket,項目名稱:MinecraftMarket-Plugin,代碼行數:38,代碼來源:Colors.java


注:本文中的org.spongepowered.api.text.format.TextColors.BLUE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。