本文整理汇总了Java中org.bukkit.Color.OLIVE属性的典型用法代码示例。如果您正苦于以下问题:Java Color.OLIVE属性的具体用法?Java Color.OLIVE怎么用?Java Color.OLIVE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Color
的用法示例。
在下文中一共展示了Color.OLIVE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRandomColor
public Color getRandomColor() {
int color = getRandomNum(17, 1);
switch (color) {
case 1: return Color.AQUA;
case 2: return Color.BLACK;
case 3: return Color.BLUE;
case 4: return Color.FUCHSIA;
case 5: return Color.GRAY;
case 6: return Color.GREEN;
case 7: return Color.LIME;
case 8: return Color.MAROON;
case 9: return Color.NAVY;
case 10: return Color.OLIVE;
case 11: return Color.ORANGE;
case 12: return Color.PURPLE;
case 13: return Color.RED;
case 14: return Color.SILVER;
case 15: return Color.TEAL;
case 16: return Color.WHITE;
case 17: return Color.YELLOW;
default: return Color.RED;
}
}
开发者ID:smessie,项目名称:SkyWarsReloaded,代码行数:23,代码来源:Game.java示例2: getColor
public static Color getColor(String c) {
switch (c) {
case "aqua": return Color.AQUA;
case "black": return Color.BLACK;
case "blue": return Color.BLUE;
case "fuschia": 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 "olvie": 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;
default: return Color.NAVY;
}
}
开发者ID:smessie,项目名称:SkyWarsReloaded,代码行数:22,代码来源:ItemUtils.java示例3: randomColor
public static Color randomColor() {
switch (NumberUtil.generateRandomInt(1, 17)) {
case 1:
return Color.AQUA;
case 2:
return Color.BLACK;
case 3:
return Color.BLUE;
case 4:
return Color.FUCHSIA;
case 5:
return Color.GRAY;
case 6:
return Color.GREEN;
case 7:
return Color.LIME;
case 8:
return Color.MAROON;
case 9:
return Color.NAVY;
case 10:
return Color.OLIVE;
case 11:
return Color.ORANGE;
case 12:
return Color.PURPLE;
case 13:
return Color.RED;
case 14:
return Color.SILVER;
case 15:
return Color.TEAL;
case 16:
return Color.WHITE;
case 17:
return Color.YELLOW;
}
return null;
}
开发者ID:DRE2N,项目名称:FactionsXL,代码行数:39,代码来源:FireworkUtil.java示例4: getColor
/**
* Get a color with a number (to work with
* randoms)
*
* @param i Number of the color
*
* @return Color
*/
public static Color getColor(int i)
{
Color c = null;
if (i == 1)
c = Color.AQUA;
else if (i == 2)
c = Color.BLACK;
else if (i == 3)
c = Color.BLUE;
else if (i == 4)
c = Color.FUCHSIA;
else if (i == 5)
c = Color.GRAY;
else if (i == 6)
c = Color.GREEN;
else if (i == 7)
c = Color.LIME;
else if (i == 8)
c = Color.MAROON;
else if (i == 9)
c = Color.NAVY;
else if (i == 10)
c = Color.OLIVE;
else if (i == 11)
c = Color.ORANGE;
else if (i == 12)
c = Color.PURPLE;
else if (i == 13)
c = Color.RED;
else if (i == 14)
c = Color.SILVER;
else if (i == 15)
c = Color.TEAL;
else if (i == 16)
c = Color.WHITE;
else if (i == 17)
c = Color.YELLOW;
return c;
}
开发者ID:SamaGames,项目名称:SamaGamesAPI,代码行数:49,代码来源:ColorUtils.java示例5: getColor
public static Color getColor(String paramString) {
String temp = paramString;
if (temp.equalsIgnoreCase("AQUA")) {
return Color.AQUA;
}
if (temp.equalsIgnoreCase("BLACK")) {
return Color.BLACK;
}
if (temp.equalsIgnoreCase("BLUE")) {
return Color.BLUE;
}
if (temp.equalsIgnoreCase("FUCHSIA")) {
return Color.FUCHSIA;
}
if (temp.equalsIgnoreCase("GRAY")) {
return Color.GRAY;
}
if (temp.equalsIgnoreCase("GREEN")) {
return Color.GREEN;
}
if (temp.equalsIgnoreCase("LIME")) {
return Color.LIME;
}
if (temp.equalsIgnoreCase("MAROON")) {
return Color.MAROON;
}
if (temp.equalsIgnoreCase("NAVY")) {
return Color.NAVY;
}
if (temp.equalsIgnoreCase("OLIVE")) {
return Color.OLIVE;
}
if (temp.equalsIgnoreCase("ORANGE")) {
return Color.ORANGE;
}
if (temp.equalsIgnoreCase("PURPLE")) {
return Color.PURPLE;
}
if (temp.equalsIgnoreCase("RED")) {
return Color.RED;
}
if (temp.equalsIgnoreCase("SILVER")) {
return Color.SILVER;
}
if (temp.equalsIgnoreCase("TEAL")) {
return Color.TEAL;
}
if (temp.equalsIgnoreCase("WHITE")) {
return Color.WHITE;
}
if (temp.equalsIgnoreCase("YELLOW")) {
return Color.YELLOW;
}
return null;
}
开发者ID:DianoxDragon,项目名称:UltimateSpawn,代码行数:56,代码来源:OtherUtils.java本文标签属性:
示例:示例的拼音
代码:代码大全可复制
java:java自行车