Solved Reading Color Codes from a Config File

Discussion in 'Spigot Plugin Development' started by JoePCool14, May 29, 2017.

  1. Hello there Spigoteers. I'm here today to ask a question about color codes. Just as a minor note, I'm working on this plugin for a school project and this isn't for actual server use, for now at least. Just need some help getting it finished.

    Anyways, I'm working on creating a plugin that will change your default chat color. Players type a command, such as /chatcolor GREEN and it will add that to the config file. I'm trying to figure out how to read this and use a listener to change the color of the message each time the player sends one. I've been looking at the documentation, but I just can't understand the ChatColor methods.

    I'm mostly concerned right now with trying to figure out how to convert the String in the config to something I can use to create a ChatColor. Any help with this is much appreciated. :)
  2. #2 T4TU_, May 29, 2017
    Last edited: May 29, 2017
    • Winner Winner x 1
  3. That appears to have done the trick. I knew there was a simple method that was able to do this; for some reason, I just couldn't find it and use it correctly. Cheers mate.