Making my Config prettier?

Discussion in 'Plugin Development' started by Gamingfreak101, Oct 26, 2014.

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

    Gamingfreak101

    So, I have an issue right now. My config is terribly ugly! (Here is an image: http://gyazo.com/16ea90b2d61c82d6665e0f1852ba5463)
    This plugin allows server owners to create a list of YouTubers that have been on his/her server. So, this being the case, I need to have a better looking configuration file and, make it so when you run the command that grabs the config, it's a different color then just white! (I did try ChatColor.x, however, I might of done it in the wrong spot) So, it would be awesome if I could have some help on achieving this type of config. Also, I'm not sure if I setup my .getConfig options the best way. (Image of my Java code for the plugin: http://gyazo.com/baeabb5254f093ee5f02fa91aa04d867 ) Thanks in advance!
     
  2. Offline

    Gerov

    Open it in Notepad++, when you open it in Windows Notepad it puts it all on one line.
     
  3. Offline

    Gamingfreak101

    What if someone was to open it in the Multicraft editor? Also, is that the easiest way to do the strings? I bet there is, I'm just not sure on how..
     
  4. Offline

    teej107

    Gamingfreak101
    Don't "open" the notepad file, "edit" the file. But you should seriously consider Notepad++. It's waaaay better than Notepad.
     
  5. Offline

    Gamingfreak101

    Editing does the same thing. I will get ++, however, how do I add color to my message? I know it won't display in the config, however, if possible, I'd like to make the colors configurable.
     
  6. Offline

    teej107

  7. Offline

    Gamingfreak101

    Correct, I have no clue how. I tried adding "1", + ChatColor.RED + "Example" I didn't have any luck...
     
  8. Offline

    teej107

  9. Offline

    MasterDoctor

    Can I point out there are many plugins like this, whats more, i think that essentials has something like this.
     
  10. Offline

    Gamingfreak101

    teej107 Where would I put that? I'm new to Java coding, haha.
     
  11. Offline

    teej107

    Gamingfreak101 It returns the string with the alternate color code replaced with minecraft's color code. In the end, the string will have color if it replaced anything.
     
  12. Offline

    es359

    Question. Why are you using the PlayerCommandPreProcessEvent() for your command...?

    You can create a method that returns the color. Or just use
    1. translateAlternateColorCodes('&', stringToTranslate);
    Like teej107 said.
     
  13. Offline

    Gamingfreak101

    teej107 I'm still not too sure on where I would put it. I messed around with it a tad and I couldn't get it. I know how it works, I just don't know where to put it. es359 Because I was lazy and it works. :p I just have to cancel the Bukkit message saying "Unknown command" Yes, I know it's incorrect.
     
  14. Offline

    mythbusterma

    Gamingfreak101

    Do it properly, there's no excuse for the way you're doing it.

    And what that method actually does is change the ampersands in the message to sign characters, so you would use that before you print the message.
     
  15. Offline

    Gamingfreak101

    mythbusterma M'kay. I would just love for my question to be answered though. :p

    I fixed the CMD so it is now an actual CMD, also, I was able to get the colors to work in the conf.

    Thanks for all of the help.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
Thread Status:
Not open for further replies.

Share This Page