Solved Change ChatColor with a Config file?

Discussion in 'Plugin Development' started by Eistee², Nov 10, 2012.

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

    Eistee²

    Hello,
    I want to make it that you can edit the ChatColor of a Message in a Config file like:

    You get <color:green><moneyAmount>$

    but the syntax can stand every where and it works?

    Is this possible?

    Sorry for my bad english
    Sincerely Eistee
     
  2. Offline

    cman1885

    onEnable you load the strings from config into a global string variable. That's just good coding. So when you do that, do getString(path).replaceAll("&","§"); That way if they do &aHI it will turn into §aHI and be light green.
     
    Eistee² likes this.
  3. Offline

    Eistee²

    Loading is no problem , does this color change work with
    Code:
    p.sendMessage(".....");
    ?

    EDIT:
    Solved thanks! :)
     
Thread Status:
Not open for further replies.

Share This Page