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


Java ChatColor.DARK_PURPLE屬性代碼示例

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


在下文中一共展示了ChatColor.DARK_PURPLE屬性的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: KingdomString

private String KingdomString(Kingdom k) {
	switch (k.getType()) {
	case ADAMANTIUM:
		return ChatColor.DARK_RED + "A" + ChatColor.DARK_GRAY + "damantium";
	case DOK:
		return ChatColor.DARK_PURPLE + "Dok";
	case EREDON:
		return ChatColor.AQUA + "Eredon";
	case GEEN:
		break;
	case HYVAR:
		return ChatColor.GOLD + "Hyvar";
	case MALZAN:
		return ChatColor.YELLOW + "Malzan";
	case TILIFIA:
		return ChatColor.DARK_GREEN + "Tilifia";
	default:
		break;

	}
	return "Er ging iets fout";
}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:22,代碼來源:KingdomMenu.java

示例3: onCommand

@Override
protected boolean onCommand(CommandSender sender, String label, String[] arguments)
{
    if (!hasPermission(sender, "api.modo.speakup"))
        return true;

    if(arguments.length == 0)
        return true;

    ChatColor color = ChatColor.BLUE;
    String tag = "Modération";

    if (SamaGamesAPI.get().getPermissionsManager().getPlayer(((Player) sender).getUniqueId()).getGroupId() == 8)
    {
        color = ChatColor.DARK_PURPLE;
        tag = "Animation";
    }

    Bukkit.broadcastMessage(color + "" + ChatColor.BOLD + "[" + tag + "] " + sender.getName() + ": " + StringUtils.join(arguments, " "));

    return true;
}
 
開發者ID:SamaGames,項目名稱:SamaGamesCore,代碼行數:22,代碼來源:CommandSpeakup.java

示例4: getChatColor

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

示例5: convertDyeColorToChatColor

public static ChatColor convertDyeColorToChatColor(DyeColor dye) {
    switch (dye) {
        case WHITE:
            return ChatColor.WHITE;
        case ORANGE:
            return ChatColor.GOLD;
        case MAGENTA:
            return ChatColor.LIGHT_PURPLE;
        case LIGHT_BLUE:
            return ChatColor.BLUE;
        case YELLOW:
            return ChatColor.YELLOW;
        case LIME:
            return ChatColor.GREEN;
        case PINK:
            return ChatColor.RED;
        case GRAY:
            return ChatColor.DARK_GRAY;
        case SILVER:
            return ChatColor.GRAY;
        case CYAN:
            return ChatColor.DARK_AQUA;
        case PURPLE:
            return ChatColor.DARK_PURPLE;
        case BLUE:
            return ChatColor.DARK_BLUE;
        case BROWN:
            return ChatColor.GOLD;
        case GREEN:
            return ChatColor.DARK_GREEN;
        case RED:
            return ChatColor.DARK_RED;
        case BLACK:
            return ChatColor.BLACK;
    }

    return ChatColor.WHITE;
}
 
開發者ID:WarzoneMC,項目名稱:Warzone,代碼行數:38,代碼來源:ColorConverter.java

示例6: Well

Well(Hub hub, Location cauldronLocation, Location standsLocation)
{
    super(hub);

    this.cauldronLocation = cauldronLocation;

    this.hologram = new Hologram(ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "Puit magique", ChatColor.LIGHT_PURPLE + "Créez des perles avec vos poussières d'\u272F");
    this.hologram.generateLines(standsLocation);

    final Location particleCenter = cauldronLocation.clone().add(0.5D, 0.5D, 0.5D);
    this.particleTask = hub.getServer().getScheduler().runTaskTimer(hub, () -> ParticleEffect.CRIT_MAGIC.display(0.5F, 0.5F, 0.5F, 0.35F, 10, particleCenter, 100.0D), 5L, 5L);
}
 
開發者ID:SamaGames,項目名稱:Hub,代碼行數:12,代碼來源:Well.java

示例7: stringToChatColor

public static ChatColor stringToChatColor(String str) {
	switch(str.toLowerCase()) {
		case "aqua":
			return ChatColor.AQUA;
		case "black":
			return ChatColor.BLACK;
		case "blue":
			return ChatColor.BLUE;
		case "dark_blue":
			return ChatColor.DARK_BLUE;
		case "dark_gray":
			return ChatColor.DARK_GRAY;
		case "dark_green":
			return ChatColor.DARK_GREEN;
		case "dark_purple":
			return ChatColor.DARK_PURPLE;
		case "dark_red":
			return ChatColor.DARK_RED;
		case "gold":
			return ChatColor.GOLD;
		case "gray":
			return ChatColor.GRAY;
		case "green":
			return ChatColor.GREEN;
		case "light_puple":
			return ChatColor.LIGHT_PURPLE;
		case "white":
			return ChatColor.WHITE;
		case "yellow":
			return ChatColor.YELLOW;
		default:
			return ChatColor.RED;
	}
}
 
開發者ID:benNek,項目名稱:AsgardAscension,代碼行數:34,代碼來源:Convert.java

示例8: pm

/**
 * Sends a plugin message.
 * @param msg
 */
public void pm(String msg) {
	msg = "[" + ChatColor.DARK_PURPLE + "PSPS" + ChatColor.RESET + "] " + msg;
	if (getConfig().getBoolean("logging.disable-colors", false)) {
		msg = ChatColor.stripColor(msg);
	}
	getServer().getConsoleSender().sendMessage(msg);
}
 
開發者ID:ProtocolSupport,項目名稱:ProtocolSupportPocketStuff,代碼行數:11,代碼來源:ProtocolSupportPocketStuff.java

示例9: getName

@Override
public String getName() {
	return ChatColor.GRAY + "[" + ChatColor.DARK_PURPLE + "Admin" + ChatColor.GRAY + "]";
}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:4,代碼來源:AdminChannelRank.java

示例10: onEnable

@Override
public void onEnable()
{
    SurvivalGame game;

    SurvivalAPI.get().loadModule(RapidOresModule.class, new CustomRapidOresModuleConfiguration().build());
    SurvivalAPI.get().loadModule(RapidFoodModule.class, new CustomRapidFoodModuleConfiguration().build());
    SurvivalAPI.get().loadModule(RapidUsefulModule.class, new CustomRapidUsefulModuleConfiguration().build());

    RapidToolsModule.ConfigurationBuilder rapidToolsConfiguration = new RapidToolsModule.ConfigurationBuilder();
    rapidToolsConfiguration.setToolsMaterial(RapidToolsModule.ConfigurationBuilder.ToolMaterial.IRON);

    SurvivalAPI.get().loadModule(RapidToolsModule.class, rapidToolsConfiguration.build());

    TorchThanCoalModule.ConfigurationBuilder torchThanCoalConfiguration = new TorchThanCoalModule.ConfigurationBuilder();
    torchThanCoalConfiguration.setTorchAmount(8);

    SurvivalAPI.get().loadModule(TorchThanCoalModule.class, torchThanCoalConfiguration.build());

    WorldDropModule.ConfigurationBuilder worldDropConfiguration = new WorldDropModule.ConfigurationBuilder();
    worldDropConfiguration.addCustomDrop(Material.OBSIDIAN, new ItemStack(Material.OBSIDIAN, 4));
    worldDropConfiguration.addCustomDrop(Material.APPLE, new ItemStack(Material.GOLDEN_APPLE, 2));

    SurvivalAPI.get().loadModule(WorldDropModule.class, worldDropConfiguration.build());

    ConstantPotionModule.ConfigurationBuilder constantPotionConfiguration = new ConstantPotionModule.ConfigurationBuilder();
    constantPotionConfiguration.addPotionEffect(PotionEffectType.SPEED, 1);
    constantPotionConfiguration.addPotionEffect(PotionEffectType.FAST_DIGGING, 0);

    SurvivalAPI.get().loadModule(ConstantPotionModule.class, constantPotionConfiguration.build());
    SurvivalAPI.get().loadModule(OneShootPassiveModule.class, null);
    SurvivalAPI.get().loadModule(AutomaticLapisModule.class, null);

    int nb = SamaGamesAPI.get().getGameManager().getGameProperties().getGameOption("playersPerTeam", new JsonPrimitive(1)).getAsInt();

    if (nb > 1)
        game = new RunBasedTeamGame<>(this, "doublerunner", "DoubleRunner", "Un Repas, un Café, un DoubleRunner !", ChatColor.DARK_PURPLE + "☕", DoubleRunnerGameLoop.class, nb);
    else
        game = new RunBasedSoloGame<>(this, "doublerunner", "DoubleRunner", "Un Repas, un Café, un DoubleRunner !", ChatColor.DARK_PURPLE + "☕", DoubleRunnerGameLoop.class);

    SurvivalAPI.get().unloadModule(RandomChestModule.class);

    SamaGamesAPI.get().getGameManager().setMaxReconnectTime(10);
    SamaGamesAPI.get().getStatsManager().setStatsToLoad(GamesNames.DOUBLERUNNER, true);
    SamaGamesAPI.get().getShopsManager().setShopToLoad(GamesNames.DOUBLERUNNER, true);
    SamaGamesAPI.get().getGameManager().setGameStatisticsHelper(new DoubleRunnerStatisticsHelper());
    SamaGamesAPI.get().getGameManager().registerGame(game);
}
 
開發者ID:SamaGames,項目名稱:DoubleRunner,代碼行數:48,代碼來源:DoubleRunner.java


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