Solved § Shows up as B

Discussion in 'Plugin Development' started by spurkle, Sep 12, 2014.

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

    spurkle

    Trying to make a descriptions for my permissions plugin shop. And this what happens:
    [​IMG]


    This is the way i read & set lores:
    [​IMG]


    [​IMG]


    Help appreciated.
     
  2. Offline

    DotDash

    Did you use ChatColor.translateAlternateCodes('&', msg); ?
     
    spurkle likes this.
  3. Offline

    4thegame3

    in minecraft there isn't the character §
    did you mean &?

    hm i didnt know that

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 28, 2017
  4. Offline

    spurkle

    How do i do that with StringLists? Do i have to parse every single line or?

    "Text in Minecraft can be formatted with the section sign (§). In normal gameplay, the section sign can only be entered into Book and Quills. However, external programs can be used to insert it in other locations."
    http://minecraft.gamepedia.com/Formatting_codes

    It is never late to learn :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 25, 2018
  5. Offline

    ChipDev

    Just use ChatColor enum.
     
    spurkle likes this.
  6. Offline

    4thegame3

  7. Offline

    spurkle

    Could you please provide me an example? Thank you.

    I could use that, but that would require me to loop through the entire list to do that. (I am working with String Lists)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  8. Offline

    Gater12

    spurkle
    List of enums here

    However it is for if you want to hard code a color in. For configurations you can assign a special character (such as &) and have the static method from ChatColor (translateAlternateColorCodes(char c, String s) ) to convert to colors.
     
    spurkle likes this.
  9. Offline

    spurkle

    Okay, thank you for all your replies. I decided to make a small function which will apply 'ChatColor.translateAlternateColorCodes' to every string in a list and put it back into a list.
    [​IMG]
     
Thread Status:
Not open for further replies.

Share This Page