How to I sent a message to a player in bold blue? I tried Code: player.sendMessage(ChatColor.BOLD.toString() + ChatColor.BLUE + "Survival" + ChatColor.DARK_AQUA + " to " + ChatColor.BOLD + ChatColor.BLUE + "Creative."); but it comes out like this: http://prntscr.com/2c9ooi
No, it needs a string after the color. Do ChatColor.BLUE +""+ChatColor.BOLD+your string. The color needs to be first!
After each ChatColor you must add a string ("") even if it's empty. For example this is what you would use: Code:java player.sendMessage(ChatColor.BLUE + "" + ChatColor.BOLD.toString() + "Survival " + ChatColor.DARK_AQUA + "to " + ChatColor.BLUE + "" + ChatColor.BOLD + "Creative.");
xTrollxDudex "Format" ChatColors are a bit broken, in that they only work in one way. You have to define the color BEFORE the format, any other way disables the format, so the correct code is: PHP: ChatColor.BLUE.toString() + ChatColor.BOLD + /* your text */
Thanks for the replies guys, it is working now I have another problem though, I have this check: Code: if (!(player.hasPermission("perms.donator")) || (player.hasPermission("perms.warrior")) || (player.hasPermission("perms.knight")) || (player.hasPermission("perms.elite")) || (player.hasPermission("hauntedessentials.legend")) || (player.hasPermission("perms.lord")) || (player.hasPermission("perms.overlord")) || (player.hasPermission("perms.god")) || (player.hasPermission("perms.haunted")) || (player.hasPermission("perms.trial-mod")) || (player.hasPermission("perms.mod")) || (player.hasPermission("perms.admin"))) { MessageManagerUtility.invalidPermission(player, command); return true; } player.openInventory(player.getEnderChest()); even if I am OP it still doesn't open my enderchest, it tells me I don't have permission
ResultStatic Sorry for the late reply but it is still telling I don't have permission even after adding the else