Whitelist message - Multiple line (spigot.yml)

Discussion in 'Spigot Discussion' started by siemaeniu500, Aug 27, 2013.

  1. Hello,

    How i can add more than one line in whitelist message in spigot.yml?
    #1 siemaeniu500, Aug 27, 2013
    Last edited: Aug 27, 2013
  2. Could try \n
    • Agree Agree x 1

  3. It doesn't work

    whitelist: You are not whitelisted on this server! \n Blablabla
    unknown-command: Unknown command. Type "/help" for help.
    server-full: The server is full!
    outdated-client: Outdated client!
    outdated-server: Outdated server!

  4. joehot200


    Bump. Want to know this too.
    • Agree Agree x 1
  5. Working for me :)


    Make sure you are using double quotes for the message when including \n.

    Code (Text):
      whitelist: "You are not whitelisted on this server!\nSecond line!"
    Spigot will change this to the config below, however it's still working for me and I think that syntax is a little bit easier.. ;)

    Code (Text):
      whitelist: |-
        You are not whitelisted on this server!
        Second line!
    Note: That should actually work outside the Spigot configuration (e.g. in plugins using a YAML configuration) too. ;)
    The reason why Spigot is changing the configuration to the config above is probably that Spigot is saving the configuration on every start, and so it will be replaced by the default "style" to get the multiple lines. (There are many ways to get the same result in YAML configurations.) So unless a plugin saves his configuration it will keep as the message in double quotes with /n. :)

    Edit: By the way, it's my first message here :cool:
    #5 Minecrell, Aug 27, 2013
    Last edited: Oct 19, 2015
    • Useful x 20
    • Agree x 3
    • Like x 2
    • Informative x 2
    • Winner x 1
  6. joehot200


    Well, an informative message it is!
    • Like Like x 1
  7. md_5

    Administrator Developer

    Thanks for sharing, that is awesome!
    • Like Like x 2
    • Friendly Friendly x 2
  8. Yea nice work I'm fairly certain it works for everything except in game messages. Multiple lines for in game messages eg player.sendMessage() need to be handled by the plugin it self.
    • Agree Agree x 1
  9. Sorry for the bump but would this support colors?
  10. Try that sign "§" instead of "&"


    "§2Example message"
    • Informative Informative x 1
  11. Thanks this helped a lot!
  12. Actually, § does not work. just use \u00A7<formattingcode>. It works great. Example: \u00A74 would make the text red (4).
  13. Isn't it possible to just run the command /whitelist ingame?
  14. This is for formatting the message the player gets when trying to connect.
  15. I have this problem too.
  16. Read post #5 and #12 and you can get 2 lines and color.