当前位置: 首页>>代码示例>>Java>>正文


Java ChatColor.BOLD属性代码示例

本文整理汇总了Java中org.bukkit.ChatColor.BOLD属性的典型用法代码示例。如果您正苦于以下问题:Java ChatColor.BOLD属性的具体用法?Java ChatColor.BOLD怎么用?Java ChatColor.BOLD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.bukkit.ChatColor的用法示例。


在下文中一共展示了ChatColor.BOLD属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: canUseBardEffect

private boolean canUseBardEffect(Player player, BardData bardData, BardEffect bardEffect, boolean sendFeedback) {
    String errorFeedback = null;
    double currentEnergy = bardData.getEnergy();
    if (bardEffect.energyCost > currentEnergy) {
        errorFeedback = ChatColor.RED + "You need at least " + ChatColor.BOLD + bardEffect.energyCost + ChatColor.RED + " energy to use this Bard buff, whilst you only have " + ChatColor.BOLD
                + currentEnergy + ChatColor.RED + '.';
    }

    long remaining = bardData.getRemainingBuffDelay();
    if (remaining > 0L) {
        errorFeedback = ChatColor.RED + "You cannot use this bard buff for another " + ChatColor.BOLD + DurationFormatter.getRemaining(remaining, true, false) + ChatColor.RED + '.';
    }

    Faction factionAt = plugin.getFactionManager().getFactionAt(player.getLocation());
    if (factionAt.isSafezone()) {
        errorFeedback = ChatColor.RED + "You may not use bard buffs in safe-zones.";
    }

    if (sendFeedback && errorFeedback != null) {
        player.sendMessage(errorFeedback);
    }

    return errorFeedback == null;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:24,代码来源:BardClass.java

示例2: reload

public static void reload(JavaPlugin plugin, String prefix, String command, String headline) {
    COMMAND_COMMAND = command;
    COMMAND_USEAGE = '/' + command + " <server>";
    COMMAND_PERMISSION = command + ".admin";
    SIGN_LINE_1 = ChatColor.BOLD + headline;
    buildConfigFile(plugin);
    if (isMinigameModeEnabled()) {
        minigameListener = new BungeeCordMinigame();
        Bukkit.getConsoleSender().sendMessage(prefix + ChatColor.YELLOW + "Enabled MINIGAME changing to allow joining.");
    } else if (isSignModeEnabled()) {
        new BungeeCordController(plugin, prefix);
        Bukkit.getConsoleSender().sendMessage(prefix + ChatColor.YELLOW + "Enabled SIGN to manage signs.");
    }
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:14,代码来源:BungeeCord.java

示例3: getScoreboardPrefix

@Override
public String getScoreboardPrefix() {
    return ChatColor.LIGHT_PURPLE.toString() + ChatColor.BOLD;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:4,代码来源:EnderPearlTimer.java

示例4: getRandomColor

public ChatColor getRandomColor(){
    ChatColor c = getRandomChatColor();

    if(c == ChatColor.MAGIC || c == ChatColor.STRIKETHROUGH || c == ChatColor.BOLD || c == ChatColor.ITALIC) getRandomColor();
    return c;
}
 
开发者ID:cadox8,项目名称:WC,代码行数:6,代码来源:ColorUtils.java

示例5: formatScore

private static String formatScore(@Nullable Integer score) {
    return score == null ? "" : BUTTON_LABEL_COLORS[score - 1].toString() + ChatColor.BOLD + score;
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:3,代码来源:MapRatingsMatchModule.java

示例6: getScoreboardPrefix

@Override
public String getScoreboardPrefix() {
    return ChatColor.GREEN.toString() + ChatColor.BOLD;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:4,代码来源:InvincibilityTimer.java

示例7: getFormattedIcon

@Override
public ItemStack getFormattedIcon(Player player)
{
    int currentLevel = -1;
    ItemLevel next;

    if (SamaGamesAPI.get().getShopsManager().getPlayer(player.getUniqueId()).getTransactionsByID(this.levels.get(0).getStorageId()) == null)
    {
        next = this.levels.get(0);
    }
    else
    {
        currentLevel = this.getLevel(player);

        if (currentLevel == 0)
            next = this.levels.get(1);
        else
            next = this.getNextItem(player);
    }

    ItemStack icon = this.getIcon().clone();
    ItemMeta meta = icon.getItemMeta();

    List<String> lore = meta.getLore() != null ? meta.getLore() : new ArrayList<>();
    lore.add("");

    if (this.defaultDescription != null)
    {
        lore.add(ChatColor.GREEN + "Par défaut : " + this.defaultDescription);
        lore.add("");
    }

    for (int i = 0; i < this.levels.size(); i++)
    {
        ItemLevel level = this.levels.get(i);
        String prefix = "";

        if (currentLevel >= i)
            prefix += ChatColor.GREEN;
        else if (i == (currentLevel + 1))
            prefix += ChatColor.YELLOW + "" + ChatColor.BOLD;
        else
            prefix += ChatColor.RED;

        lore.add(prefix + "Niveau " + (i + 1) + " : " + level.getDescription());
    }

    if (CosmeticAccessibility.valueOf(this.itemDescription.getRankAccessibility()) != CosmeticAccessibility.ALL)
    {
        lore.add("");
        lore.add(ChatColor.GRAY + "Vous devez posséder le grade");
        lore.add(CosmeticAccessibility.valueOf(this.itemDescription.getRankAccessibility()).getDisplay() + ChatColor.GRAY + " pour pouvoir utiliser cet");
        lore.add(ChatColor.GRAY + "objet.");
    }

    lore.add("");

    if (next == null)
        lore.add(ChatColor.GREEN + "Améliorations débloquées");
    else
        lore.add(ChatColor.GRAY + "Prix : " + ChatColor.GOLD + next.getCost() + " pièces");

    meta.setLore(lore);
    icon.setItemMeta(meta);

    return icon;
}
 
开发者ID:SamaGames,项目名称:Hub,代码行数:67,代码来源:ShopImprovableItem.java

示例8: getScoreboardPrefix

@Override
public String getScoreboardPrefix() {
    return ChatColor.RED.toString() + ChatColor.BOLD;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:4,代码来源:CombatTimer.java

示例9: createTitle

private static String createTitle(String text)
{
    return ChatColor.GOLD + "" + ChatColor.BOLD + text + ChatColor.RESET + "" + ChatColor.GRAY + " (Clic-droit)";
}
 
开发者ID:SamaGames,项目名称:Hub,代码行数:4,代码来源:StaticInventory.java

示例10: display

@Override
public void display(Player player)
{
    this.inventory = this.hub.getServer().createInventory(null, 45, "Menu Principal");

    this.setSlotData(ChatColor.GOLD + "Zone " + ChatColor.GREEN + "VIP", Material.DIAMOND, 9, makeButtonLore(new String[] { "Testez les jeux avant tout le monde !" }, false, true), "beta_vip");
    this.setSlotData(ChatColor.GOLD + "Spawn", Material.BED, 18, makeButtonLore(new String[] { "Retournez au spawn grâce à la magie", "de la téléportation céleste !" }, false, true), "spawn");
    this.setSlotData(ChatColor.GOLD + "Parcours du ciel", Material.PACKED_ICE, 26, makeButtonLore(new String[] { "En espérant que vous atteignez le", "paradis..."}, false, true), "parkour");
    this.setSlotData(ChatColor.GOLD + "Informations", Material.EMPTY_MAP, 27, getInformationLore(), "none");
    this.setSlotData(ChatColor.GOLD + "Changer de hub", Material.ENDER_CHEST, 35, makeButtonLore(new String[] { "Cliquez pour ouvrir l'interface" }, true, false), "switch_hub");

    for (String gameIdentifier : this.hub.getGameManager().getGames().keySet())
    {
        AbstractGame game = this.hub.getGameManager().getGameByIdentifier(gameIdentifier);

        if (game.getSlotInMainMenu() >= 0)
        {
            String prefix;

            switch (game.getState())
            {
                case NEW:
                    prefix = ChatColor.GREEN + "" + ChatColor.BOLD + "NOUVEAU !";
                    break;

                case POPULAR:
                    prefix = ChatColor.YELLOW + "" + ChatColor.BOLD + "POPULAIRE !";
                    break;

                case SOON:
                    prefix = ChatColor.RED + "" + ChatColor.BOLD + "BIENTOT !";
                    break;

                case LOCKED:
                    prefix = ChatColor.GOLD + "" + ChatColor.MAGIC + "aaaaaaaa";
                    break;

                default:
                    prefix = "";
                    break;
            }

            if (!prefix.equals(""))
                prefix += " ";

            boolean glow = game.getState() == AbstractGame.State.NEW || game.getState() == AbstractGame.State.POPULAR;

            this.setSlotData(prefix + ChatColor.GOLD + game.getName(), ItemUtils.hideAllAttributes(game.getState() == AbstractGame.State.LOCKED ? new ItemStack(Material.IRON_FENCE, 1) : (glow ? GlowEffect.addGlow(game.getIcon()) : game.getIcon())), game.getSlotInMainMenu(), makeGameLore(game), "game_" + gameIdentifier);
        }
    }

    this.hub.getServer().getScheduler().runTask(this.hub, () -> player.openInventory(this.inventory));
}
 
开发者ID:SamaGames,项目名称:Hub,代码行数:53,代码来源:GuiMain.java

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

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

@Override
public String getPromptText(ConversationContext context) {
    return ChatColor.YELLOW + "Are you sure you want to do this? " + ChatColor.RED + ChatColor.BOLD + "All claims" + ChatColor.YELLOW + " will be cleared. " + "Type " + ChatColor.GREEN
            + "yes" + ChatColor.YELLOW + " to confirm or " + ChatColor.RED + "no" + ChatColor.YELLOW + " to deny.";
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:5,代码来源:FactionClearClaimsArgument.java

示例14: getName

@Override
public String getName(Entity forWhat, Player forWho) {
    return ChatColor.AQUA + "" + ChatColor.BOLD + "Owner" + ChatColor.RESET + " `PREV`";
}
 
开发者ID:iso2013,项目名称:MultiLineAPI,代码行数:4,代码来源:ExampleTagController.java

示例15: getScoreboardPrefix

public String getScoreboardPrefix()
{
  return ChatColor.GOLD.toString() + ChatColor.BOLD;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:4,代码来源:ArcherTimer.java


注:本文中的org.bukkit.ChatColor.BOLD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。