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