First join Random MOTD

Discussion in 'Archived: Plugin Requests' started by CaptainWalrus, Jan 30, 2014.

  1. Offline

    CaptainWalrus

    I'm looking for a plugin on a players first join they get a random MOTD from a config sent to them.
    It will not send to everyone, only the player who joined for the first time. (this is only for first join, and only send to that one player. Not publicly.)
    also should support %player% and color codes. %player% will display the players name who joined.
    Config would be like this:

    MOTD 1: Welcome %player% stufstuffstuff
    MOTD 2: Welcome, have a good time.
    (You can add infinite of these)
     
  2. Offline

    codermason

    here you go: <Edit by Moderator: Redacted mediafire url>
    you can view the code here: https://gist.github.com/codermason/8722046
    the config work likes this
    Code:
    motds:
      - '&6Welcome, %player%!'
      - 'You joined my server, &c%player%!'
     
    Last edited by a moderator: Nov 3, 2016
  3. Offline

    AndyMcB1

    [quote uid=90904120 name="codermason" post=2222440]here you go: <Edit by Moderator: Redacted mediafire url>
    you can view the code here: https://gist.github.com/codermason/8722046
    the config work likes this
    Code:
    motds:
      - '&6Welcome, %player%!'
      - 'You joined my server, &c%player%!'
    [/quote]
    Did you test it? You didn't implement the listener.

    codermason You have your PlayerJoinEvent inside onEnable()

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

    CaptainWalrus

    [quote uid=90904120 name="codermason" post=2222440]here you go: <Edit by Moderator: Redacted mediafire url>
    you can view the code here: https://gist.github.com/codermason/8722046
    the config work likes this
    Code:
    motds:
      - '&6Welcome, %player%!'
      - 'You joined my server, &c%player%!'
    [/quote]

    it does it everytime you join, I only need it the first time you ever join the server.
     
    Last edited by a moderator: Nov 3, 2016
  5. Offline

    timtower Administrator Administrator Moderator

    He did, he created a new Listener in the onEnable, that is possible
     
  6. Offline

    CaptainWalrus

    Still, the message works.. Except it's every join.. I only want it on their first join :c
     
  7. Offline

    timtower Administrator Administrator Moderator

    Code says that it is only on first join to be honest
     

Share This Page