当前位置: 首页>>代码示例>>Java>>正文


Java TextColors.RED属性代码示例

本文整理汇总了Java中org.spongepowered.api.text.format.TextColors.RED属性的典型用法代码示例。如果您正苦于以下问题:Java TextColors.RED属性的具体用法?Java TextColors.RED怎么用?Java TextColors.RED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.spongepowered.api.text.format.TextColors的用法示例。


在下文中一共展示了TextColors.RED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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

示例4: build

@Override
protected RColour build() {
	this.BLACK = TextColors.BLACK;
	this.DARK_GRAY = TextColors.DARK_GRAY;
	this.GRAY = TextColors.GRAY;
	this.WHITE = TextColors.WHITE;

	this.DARK_RED = TextColors.DARK_RED;
	this.RED = TextColors.RED;

	this.DARK_GREEN = TextColors.DARK_GREEN;
	this.GREEN = TextColors.GREEN;

	this.BLUE = TextColors.BLACK;
	this.DARK_BLUE = TextColors.DARK_BLUE;

	this.AQUA = TextColors.AQUA;
	this.DARK_AQUA = TextColors.DARK_AQUA;

	this.DARK_PURPLE = TextColors.DARK_PURPLE;
	this.LIGHT_PURPLE = TextColors.LIGHT_PURPLE;
	
	this.GOLD = TextColors.GOLD;
	this.YELLOW = TextColors.YELLOW;

	return this;
}
 
开发者ID:redstone,项目名称:RCameraStudio,代码行数:27,代码来源:RColourSponge.java


注:本文中的org.spongepowered.api.text.format.TextColors.RED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。