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


Java ChatColor.DARK_GRAY屬性代碼示例

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


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

示例1: refreshTab

private void refreshTab(Player player) {
    MatchStatus matchStatus = TGM.get().getMatchManager().getMatch().getMatchStatus();

    ChatColor timeColor = ChatColor.GREEN;
    if (matchStatus == MatchStatus.PRE) {
        timeColor = ChatColor.GOLD;
    } else if (matchStatus == MatchStatus.POST) {
        timeColor = ChatColor.RED;
    }

    String header = ChatColor.WHITE + ChatColor.BOLD.toString() + TGM.get().getMatchManager().getMatch().getMapContainer().getMapInfo().getGametype().toString() +
                    ChatColor.DARK_GRAY + " - " + timeColor + Strings.formatTime(TGM.get().getMatchManager().getMatch().getModule(TimeModule.class).getTimeElapsed()) +
                    ChatColor.DARK_GRAY + " - " + ChatColor.WHITE + ChatColor.BOLD.toString() + "WARZONE";

    String footer = "";
    for (MatchTeam matchTeam : teamManagerModule.getTeams()) {
        if (matchTeam.isSpectator()) continue;
        footer += matchTeam.getColor() + matchTeam.getAlias() + ": " + ChatColor.WHITE + matchTeam.getMembers().size() + ChatColor.DARK_GRAY + "/" + ChatColor.GRAY + matchTeam.getMax();
        footer += ChatColor.DARK_GRAY + " - ";
    }
    footer += ChatColor.AQUA + "Spectators: " + ChatColor.WHITE + TGM.get().getModule(TeamManagerModule.class).getSpectators().getMembers().size();


    TitleAPI.sendTabTitle(player, header, footer);
}
 
開發者ID:WarzoneMC,項目名稱:Warzone,代碼行數:25,代碼來源:TabListModule.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: ShowFatigue

@SuppressWarnings("deprecation")
public static String ShowFatigue(Player player)
{
	int fatigue = mainBoard.getObjective("Fatigue").getScore(player).getScore();

	if(fatigue <= 0)
		return ChatColor.YELLOW + Words.get("Energized");
	else if(fatigue == 1)
		return ChatColor.LIGHT_PURPLE + Words.get("Sleepy");
	else if(fatigue == 2)
		return ChatColor.RED + Words.get("Overworked");
	else if(fatigue == 3)
		return ChatColor.WHITE + Words.get("Distressed");
	else if(fatigue >= 4)
		return ChatColor.DARK_GRAY + Words.get("Collapsed");
	else
		return "";
}
 
開發者ID:FattyMieo,項目名稱:SurvivalPlus,代碼行數:18,代碼來源:Survival.java

示例4: onPlayerChat

@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent ev)
{
    if (ev.isCancelled())
        return ;
    ev.setCancelled(true);
    CPlayer cplayer = AgarMC.get().getGame().getCPlayer(ev.getPlayer());
    if (cplayer == null)
        return ;
    String msg = "";
    if (AgarMC.get().getGame().getGameType() == GameType.TEAMS)
    {
        TeamColor team = TeamColor.getTeam(cplayer.getColor());
        msg += ChatColor.DARK_GRAY + "[" + (team == null ? ChatColor.DARK_RED + "ERROR" : team.getDisplayName()) + ChatColor.DARK_GRAY + "]";
    }
    if (cplayer.isPlaying())
        msg += ChatColor.DARK_GRAY + "[" + ChatColor.GREEN + cplayer.getTotalMass() + ChatColor.DARK_GRAY + "]";
    if (!msg.isEmpty())
        msg += " ";
    msg += ChatColor.GRAY + ev.getPlayer().getName() + ChatColor.WHITE + ": " + ev.getMessage();
    for (Player p : Bukkit.getOnlinePlayers())
        p.sendMessage(msg);
    Bukkit.getConsoleSender().sendMessage(msg);
}
 
開發者ID:SamaGames,項目名稱:AgarMC,代碼行數:24,代碼來源:PlayerListener.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: getInformationLore

private static String[] getInformationLore()
{
    return new String[] {
            ChatColor.DARK_GRAY + "Site internet : " + ChatColor.GRAY + "https://www.samagames.net",
            ChatColor.DARK_GRAY + "Forum : " + ChatColor.GRAY + "https://www.samagames.net/forum/",
            ChatColor.DARK_GRAY + "Boutique : " + ChatColor.GRAY + "http://shop.samagames.net/",
            "",
            ChatColor.DARK_GRAY + "TeamSpeak : " + ChatColor.GRAY + "ts.samagames.net"
    };
}
 
開發者ID:SamaGames,項目名稱:Hub,代碼行數:10,代碼來源:GuiMain.java

示例7: onCommand

@Override
protected void onCommand(CommandSender sender, String[] args) {
    String message = ChatColor.DARK_GRAY + ": " + ChatColor.WHITE
            + Chat.applyAllFilters(sender, String.join(" ", skipArgs(args, 1)));
    CommandSender receiver = args[0].equalsIgnoreCase("CONSOLE")
            ? Bukkit.getConsoleSender() : Bukkit.getPlayer(args[0]);

    if (!Utils.isVisible(sender, receiver))
        return;

    if (receiver instanceof Player && AFK.isAFK((Player) receiver))
        sender.sendMessage(ChatColor.GRAY + "This player is AFK, and may not receive your message.");

    // Send display to sender
    String rName = Utils.getSenderName(receiver);
    sender.sendMessage(ChatColor.DARK_GRAY.toString() + ChatColor.BOLD + "TO " + rName + message);
    if (sender instanceof Player)
        MetadataManager.setMetadata((Player) sender, "lastWhisper", receiver.getName());

    // Send display to receiver.
    if (receiver instanceof Player) {
        Player p = (Player) receiver;
        if (KCPlayer.getWrapper(p).isIgnoring(sender))
            return;

        p.playSound(p.getLocation(), Sound.ENTITY_ITEM_PICKUP, 1, .75F);
        MetadataManager.setMetadata(p, "lastWhisper", sender.getName());
    }

    receiver.sendMessage(ChatColor.DARK_GRAY.toString() + ChatColor.BOLD + "FROM " + Utils.getSenderName(sender) + message);
}
 
開發者ID:Kneesnap,項目名稱:Kineticraft,代碼行數:31,代碼來源:CommandMessage.java

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

示例9: formatProperty

private String formatProperty(String name, Object value) {
    return "  " + ChatColor.GRAY + name + ChatColor.DARK_GRAY + ": " + ChatColor.WHITE + value;
}
 
開發者ID:OvercastNetwork,項目名稱:ProjectAres,代碼行數:3,代碼來源:DestroyableCommands.java

示例10: formatInfoMessage

public static String formatInfoMessage(String message) {
    return ChatColor.WHITE + "" + ChatColor.BOLD + "RLStaffChat " + ChatColor.DARK_GRAY + "" + ChatColor.BOLD + ">> " + ChatColor.GRAY + message;
}
 
開發者ID:inventor02,項目名稱:RLStaffChat,代碼行數:3,代碼來源:MessageFormatUtil.java

示例11: formatStaffChatMessage

public static String formatStaffChatMessage(Player from, String message) {
    return ChatColor.RED + "" + ChatColor.BOLD + "[STAFF] " + ChatColor.BOLD + from.getDisplayName() + ChatColor.DARK_GRAY + "" + ChatColor.BOLD + " >> " + ChatColor.WHITE + message;
}
 
開發者ID:inventor02,項目名稱:RLStaffChat,代碼行數:3,代碼來源:MessageFormatUtil.java

示例12: formatStaffChatReply

public static String formatStaffChatReply(Player from, Player to, String message) {
    return ChatColor.RED + "" + ChatColor.BOLD + "[STAFF] " + ChatColor.BOLD + from.getDisplayName() + ChatColor.GRAY + " -> " + ChatColor.BOLD + to.getDisplayName() + ChatColor.DARK_GRAY + "" + ChatColor.BOLD + " >> " + ChatColor.WHITE + message;
}
 
開發者ID:inventor02,項目名稱:RLStaffChat,代碼行數:3,代碼來源:MessageFormatUtil.java

示例13: formatAdminChatMessage

public static String formatAdminChatMessage(Player from, String message) {
    return ChatColor.DARK_RED + "" + ChatColor.BOLD + "[ADMIN] " + ChatColor.BOLD + from.getDisplayName() + ChatColor.DARK_GRAY + "" + ChatColor.BOLD + " >> " + ChatColor.WHITE + message;
}
 
開發者ID:inventor02,項目名稱:RLStaffChat,代碼行數:3,代碼來源:MessageFormatUtil.java

示例14: formatAdminChatReply

public static String formatAdminChatReply(Player from, Player to, String message) {
    return ChatColor.DARK_RED + "" + ChatColor.BOLD + "[ADMIN] " + ChatColor.BOLD + from.getDisplayName() + ChatColor.GRAY + " -> " + ChatColor.BOLD + to.getDisplayName() + ChatColor.DARK_GRAY + "" + ChatColor.BOLD + " >> " + ChatColor.WHITE + message;
}
 
開發者ID:inventor02,項目名稱:RLStaffChat,代碼行數:3,代碼來源:MessageFormatUtil.java

示例15: getFormattedMessage

private String getFormattedMessage(Player player, PlayerFaction playerFaction, String playerDisplayName, String message, CommandSender viewer)
{
  String tag = playerFaction == null ? ChatColor.RED + "*" : playerFaction.getDisplayName(viewer);
  return ChatColor.DARK_GRAY + "[" + tag + ChatColor.DARK_GRAY + "] " + (EOTW_CAPPERS.contains(player.getUniqueId()) ? EOTW_CAPPER_PREFIX : "") + 
    String.format(Locale.ENGLISH, playerDisplayName, new Object[] { player.getName(), message });
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:6,代碼來源:ChatListener.java


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