本文整理匯總了Java中org.bukkit.DyeColor.RED屬性的典型用法代碼示例。如果您正苦於以下問題:Java DyeColor.RED屬性的具體用法?Java DyeColor.RED怎麽用?Java DyeColor.RED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.DyeColor
的用法示例。
在下文中一共展示了DyeColor.RED屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convertChatColorToDyeColor
public static DyeColor convertChatColorToDyeColor(ChatColor chatColor) {
switch (chatColor) {
case WHITE:
return DyeColor.WHITE;
case AQUA:
return DyeColor.LIGHT_BLUE;
case GOLD:
return DyeColor.ORANGE;
case LIGHT_PURPLE:
return DyeColor.MAGENTA;
case YELLOW:
return DyeColor.YELLOW;
case GREEN:
return DyeColor.LIME;
case RED:
return DyeColor.RED;
case GRAY:
return DyeColor.SILVER;
case DARK_GRAY:
return DyeColor.GRAY;
case DARK_AQUA:
return DyeColor.CYAN;
case DARK_PURPLE:
return DyeColor.PURPLE;
case DARK_BLUE:
return DyeColor.BLUE;
case BLUE:
return DyeColor.BLUE;
case DARK_GREEN:
return DyeColor.GREEN;
case DARK_RED:
return DyeColor.RED;
case BLACK:
return DyeColor.BLACK;
}
return DyeColor.WHITE;
}
示例2: colorFromMnc
/**
* Converts a banner color from Miner Needs Cool Shoes
*
* @param c the char representing the color
* @return DyeColor
*/
public static DyeColor colorFromMnc(char c) { //Don't question the characters, it's just like that.
switch (c) {
case 'a':
return DyeColor.BLACK;
case 'b':
return DyeColor.RED;
case 'c':
return DyeColor.GREEN;
case 'd':
return DyeColor.BROWN;
case 'e':
return DyeColor.BLUE;
case 'f':
return DyeColor.PURPLE;
case 'g':
return DyeColor.CYAN;
case 'h':
return DyeColor.SILVER;
case 'i':
return DyeColor.GRAY;
case 'j':
return DyeColor.PINK;
case 'k':
return DyeColor.LIME;
case 'l':
return DyeColor.YELLOW;
case 'm':
return DyeColor.LIGHT_BLUE;
case 'n':
return DyeColor.MAGENTA;
case 'o':
return DyeColor.ORANGE;
case 'p':
return DyeColor.WHITE;
default:
return null;
}
}