Simple Welcome Message

Discussion in 'Archived: Plugin Requests' started by PotatoTears, Feb 10, 2014.

  1. Offline

    PotatoTears

    Whenever a player joins, he gets a custom message in the chat.

    The first line will be this:


    &b ▁ ▂ ▃ ▄ ▅ ▆ ▇ ___________ &b


    Now, the ______ is a custom message from the config.

    Now, below this thing is lots of text. You can define all that in the config with supported linebreaks and color codes.

    Example Config:

    Title_Message: "&4Welcome to Servername!"
    Message: "Hello and welcome to &othis server&f.\nDo &4/help &rfor help blabla"
     
  2. Offline

    webbhead

    PotatoTears
    Would this be broadcasted to the whole server or a message right to him?
     
  3. Offline

    np15isntboss

    I can make you this plugin easily. If you would PM me, I have some more questions.
     
  4. Offline

    webbhead

    PotatoTears
    I just started and have most of it done :)

    PotatoTears
    I am finished. Sorry.. But I did not know how to implement a line break so.. Thats the only thing not implemented. Also when using color codes do not use '&' symbol use this symbol: '§' There is a line in the config showing this :)

    PotatoTears
    Plugin Finished here is the download: <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 3, 2016
  5. Offline

    PotatoTears

    webbhead Where will the text go if there are no linebreaks_ Oh and can somebody like help you on how to implement linebreaks_
    Does it only broadcast to the player_ because i wanted it so
     
  6. Offline

    timtower Administrator Administrator Moderator

    webbhead Try making it a list instead of a single message, then loop through the list and send the messages 1 by 1, will create enters
     
  7. Offline

    webbhead

    PotatoTears timtower
    Yes It is private message to them.

    And I will try that timtower thanks :)

    timtower
    Okay... lol but I do not know what you mean I thought I did, but I do not. :/

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

    ZakPvP

    Get mycommand
    I just did this
    '2':
    command: /help
    type: TEXT
    text:
    - ''
    - '&7-------------------&9&nApex Prison&7---------------------'
    - ''
    - '&7Use &9/rankup &7to buy the next rank!'
    - '&7Use &9/warps &7list all the warps you have access too!'
    - '&7Use &9/kits &7see what kits you have and when you can use them!'
    - '&7Use &9/vote &7earn &9OP &7rewards from voting for &9Apex Prison'
    - '&7Use &9/enderchest &7to open your enderchest anywhere!'
    - '&7Use &9/feed &7to heal all your hunger bar!'
    - '&7Use &9/buy &7to buy donor ranks and donate!'
    - ''
    - '&7-------------------&9&nApex Prison&7---------------------'

    for my /help
    you can make welcome messages, alias commands, commands that return text etc.
     
  9. Offline

    webbhead

    timtower ZakPvP
    Oh Now I actually know what he means :p

    timtower
    I am sorry for the trouble.. But, how might I go about sending a String to a player so such as creating a string in the config.yml so it would be like:
    title_message: 'message'
    messages:
    - 'message'
    - 'message'


    P.S. I am still pretty new to coding :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
    timtower likes this.
  10. Offline

    timtower Administrator Administrator Moderator

    webbhead
    Code:java
    1. List<String> messages = this.getConfig().getStringList("messages");
    2. for(String message:messages){
    3. player.sendMessage(message);
    4. }

    That is all you need
     
  11. Offline

    webbhead

    timtower
    Thank you!
    P.S. You are very helpful :p
     
  12. Offline

    timtower Administrator Administrator Moderator

    No problem ;)
    P.S. That is what I am trying to do here ;)
     
  13. Offline

    webbhead

    PotatoTears
    Okay finished with your plugin here is the download: <Edit by Moderator: Redacted mediafire url>

    Note: test_message now supports color codes such as & sign without using the § but the messages: - Does not
     
    Last edited by a moderator: Nov 3, 2016
  14. Offline

    PotatoTears

    webbhead Does the plugin not send these ▁ ▂ ▃ ▄ ▅ ▆ ▇ symbols?
     
  15. Offline

    timtower Administrator Administrator Moderator

    Do you get errors? And could you post your config?
     
  16. Offline

    PotatoTears

    timtower I think webbhead did not add this into the plugin.
     
  17. Offline

    webbhead

    PotatoTears
    Well, I get errors when I try to save the config like that so you can change it yourself.
    Also (Your welcome for the plugin)
    timtower Thanks for the help
     
    timtower likes this.
  18. Offline

    PotatoTears

    webbhead As i said in my post - you can not put utf-8 in configs. You have to code it inside the plugin.
     
  19. Offline

    timtower Administrator Administrator Moderator

    Well, actually you can...
    What editor are you using? Could you post your config? Could somebody post that error?
     
    webbhead likes this.
  20. Offline

    PotatoTears

    timtower The symbols i am trying to use in the config turn into ??????

    webbhead would have to code it inside the plugin.
     
  21. Offline

    timtower Administrator Administrator Moderator

    In notepad or the plugin? If in notepad: change some settings.
     
  22. Offline

    PotatoTears

    timtower In the config, i am using Wordpad.
     
  23. Offline

    timtower Administrator Administrator Moderator

    Download notepad++, open the config with that. Then try again
     
  24. Offline

    webbhead

    PotatoTears
    It allows me to use §.. Although, I am on a mac using TextWrangler.
     
  25. Offline

    PotatoTears

    webbhead timtower I can use § but i cannot use ▁ ▂ ▃ ▄ ▅ ▆ ▇
     
  26. Offline

    Desle

    timtower
    The default config doesn't support UTF-8 characters (atleast not when i make my plugins).
     
  27. Offline

    timtower Administrator Administrator Moderator

    Noticed that yes.
    PotatoTears If you really want this then I suggest that you give webbhead a simple "thank you" first
     
  28. Offline

    DemmyDemon

    Remember, you also have to enable Unicode in the client.
    Options... -> Language... -> Force Unicode Font

    As far as I know, there is no way to force this, or even detect it, on the server side.
     
  29. Offline

    Desle

  30. Offline

    PotatoTears

Share This Page