当前位置: 首页>>代码示例>>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;未经允许,请勿转载。