Solved 2 Colors

Discussion in 'Plugin Development' started by HelloThereItsMe, Mar 21, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    HelloThereItsMe

    How can I make a word a colorful and bold. For example "ChatColor.GOLD + ChatColor.BOLD + 'Hello'"
    Thanks
     
  2. @HelloThereItsMe Do you mean when a player chats or just the chat colors themself?
     
  3. Offline

    HelloThereItsMe

    Chat colors
     
  4. @HelloThereItsMe You have to do
    Code:
    ChatColor.AQUA + ChatColor.BOLD
    in that order. Little weird, but works
     
  5. Offline

    HelloThereItsMe

    I get an error when I use that :(
     
  6. Offline

    nverdier

    Where are you putting that? Please post all of the code, and the error you are getting.
     
  7. Offline

    HelloThereItsMe

    Code:

    @EventHandler
    public void onJoin(PlayerJoinEvent e){
    Player player = e.getPlayer();
    String name = player.getName();
    ItemStack chest = new ItemStack(Material.CHEST);
    ItemMeta chestMeta = chest.getItemMeta();
    chestMeta.setDisplayName(ChatColor.RED + ChatColor.BOLD + "Cosmetics!"); <-------- !AREA!
    chestMeta.setLore(Arrays.asList(ChatColor.BLUE + "Click for cosmetics!"));
    chest.setItemMeta(chestMeta);
    player.getInventory().clear();
    player.getInventory().setItem(4, chest);
    BarAPI.setMessage(player, ChatColor.RED + "Welcome to BuldingNetwork " + name, 9999999f);
    player.playSound(player.getLocation(), Sound.LEVEL_UP, 10, 1);


    }

    I did import it
     
  8. CodePlaysMinecraft likes this.
Thread Status:
Not open for further replies.

Share This Page