Chat color command

Discussion in 'Plugin Development' started by darkavatar23, Jan 11, 2013.

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

    darkavatar23

    I'm searching for a command to change the chat color of a plugin ...i've tryed this

    Code:
    try{
                        String ConvertedUserColor = ChatColor.translateAlternateColorCodes('0', args[0]);
                        Bukkit.getServer().broadcastMessage("Attivazione Matthecracft plugin Pack Spam la frase è: "+ ConvertedUserColor);
                        new reminder(ConvertedUserColor);
                    }
                    catch(Throwable any){
                        Bukkit.getServer().broadcastMessage("Error invalid arguments");
                    }
    but the string don't change color... what i have to do ?
     
  2. Offline

    HollowCube

    Add "ChatColor.<colourname>" in front of the string you would like to add colour to. For example:
    Code:java
    1. String myColouredString = ChatColor.BLUE + "String contents.";
     
    darkavatar23 likes this.
  3. Offline

    darkavatar23

Thread Status:
Not open for further replies.

Share This Page