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


Java Color.ORANGE屬性代碼示例

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


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

示例1: getColor

public static Color getColor(ChatColor color) {
    if (color == ChatColor.RED) {
        return Color.RED;
    } else if (color == ChatColor.BLUE) {
        return Color.BLUE;
    } else if (color == ChatColor.LIGHT_PURPLE) {
        return Color.FUCHSIA;
    } else if (color == ChatColor.GREEN) {
        return Color.GREEN;
    } else if (color == ChatColor.YELLOW) {
        return Color.YELLOW;
    } else if (color == ChatColor.GOLD) {
        return Color.ORANGE;
    } else if (color == ChatColor.AQUA) {
        return Color.AQUA;
    } else if (color == ChatColor.DARK_PURPLE) {
        return Color.PURPLE;
    } else {
        return Color.WHITE;
    }
}
 
開發者ID:WarzoneMC,項目名稱:Warzone,代碼行數:21,代碼來源:ColorConverter.java

示例2: 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

示例3: 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

示例4: onProjectileHit

@EventHandler
public void onProjectileHit(ProjectileHitEvent e) throws Exception {
	if (fireballList.contains(e.getEntity().getUniqueId())) {
		Location fireballHitLocation = e.getEntity().getLocation();
		if(!KingdomFactionsPlugin.getInstance().getDataManager().getBoolean("Test.enabled")) {
		fireballHitLocation.getWorld().createExplosion(fireballHitLocation.getX(), fireballHitLocation.getY(),
				fireballHitLocation.getZ(), 4, true, true);
		} else {
			fireballHitLocation.getWorld().createExplosion(fireballHitLocation.getX(), fireballHitLocation.getY(),
					fireballHitLocation.getZ(), 4, true, false);
		}

		FireworkEffect.Type type = FireworkEffect.Type.BALL_LARGE;
		Color c1 = Color.ORANGE;
		Color c2 = Color.RED;

		FireworkEffect effect = FireworkEffect.builder().flicker(true).withColor(c1).withFade(c2).with(type)
				.trail(true).build();

		FireworkEffectPlayer fireworkPlayer = new FireworkEffectPlayer();

		fireworkPlayer.playFirework(fireballHitLocation.getWorld(), fireballHitLocation, effect);
		for (Entity ent : Utils.getInstance().getNearbyEntities(fireballHitLocation, 5)) {
			if ((ent instanceof LivingEntity)) {
				ent.setFireTicks(ent.getFireTicks() + 60);
			}
		}
		fireballList.remove(e.getEntity().getUniqueId());
	}
}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:30,代碼來源:Comet.java

示例5: 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

示例6: convertByteToColor

public static Color convertByteToColor(byte d) {
	Color c = null;
	if (d == 0)
		c = Color.WHITE;
	if (d == 1)
		c = Color.ORANGE;
	if (d == 2)
		c = Color.FUCHSIA;
	if (d == 3)
		c = Color.BLUE;
	if (d == 4)
		c = Color.YELLOW;
	if (d == 5)
		c = Color.LIME;
	if (d == 6)
		c = Color.FUCHSIA;
	if (d == 7)
		c = Color.GRAY;
	if (d == 8)
		c = Color.GRAY;
	if (d == 9)
		c = Color.TEAL;
	if (d == 10)
		c = Color.PURPLE;
	if (d == 11)
		c = Color.BLUE;
	if (d == 12)
		c = Color.MAROON;
	if (d == 13)
		c = Color.GREEN;
	if (d == 14)
		c = Color.RED;
	if (d == 15)
		c = Color.BLACK;
	return c;
}
 
開發者ID:jusjus112,項目名稱:OnlineChecker-Spigot-SQL-Support,代碼行數:36,代碼來源:UtilItem.java

示例7: chatColorToColor

public static Color chatColorToColor(ChatColor color) {
	switch(color) {
		case AQUA:
			return Color.AQUA;
		case BLACK:
			return Color.BLACK;
		case BLUE:
			return Color.NAVY;
		case DARK_BLUE:
			return Color.BLUE;
		case DARK_GRAY:
			return Color.SILVER;
		case DARK_GREEN:
			return Color.GREEN;
		case DARK_PURPLE:
			return Color.PURPLE;
		case DARK_RED:
			return Color.MAROON;
		case GOLD:
			return Color.ORANGE;
		case GRAY:
			return Color.GRAY;
		case GREEN:
			return Color.LIME;
		case LIGHT_PURPLE:
			return Color.FUCHSIA;
		case YELLOW:
			return Color.YELLOW;
		case WHITE:
			return Color.WHITE;
		default:
			return Color.RED;
	}
}
 
開發者ID:benNek,項目名稱:AsgardAscension,代碼行數:34,代碼來源:Convert.java

示例8: 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

示例9: 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


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