[SOLVED]Changing colours via config

Discussion in 'Plugin Development' started by CRAZYxMUNK3Y, Mar 17, 2012.

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

    CRAZYxMUNK3Y

    Is it possible to have a config as such;
    Code:
    Plugin:
      Message:
      Colour:
    
    And have what is set in the config, the colour that in the chat.

    Example, if Colour in config was green, it would be the same as
    Code:java
    1.  
    2. player.sendMessage(ChatColor.GREEN + getConfig.getString("plugin.message"))
    3.  


    I hope this makes sense :S

    Thanks
     
  2. hm... you can use something like this
    Code:java
    1. if(this.getConfig().getString("Plugin.Colour").equals("green")){
    2. player.sendMessage(ChatColor.GREEN + getConfig().getString("Plugin.Message"));
    3. }
     
  3. Offline

    CRAZYxMUNK3Y


    Never thought of that, lol.

    Thanks
     
Thread Status:
Not open for further replies.

Share This Page