Filled Welcome plugin that announces how many players have ever joined.

Discussion in 'Plugin Requests' started by Kody_Jay, Sep 8, 2016.

Thread Status:
Not open for further replies.
  1. Hello, thank you for clicking to read this plugin request.
    What I want is a plugin so that when 100th player joined the server for the first time, it says,

    "Welcome PlayerName to the server! (#100)"

    I would also like a config.yml so I can edit the message and change the colors of it, thank you.
     
  2. I can do that, but do you mean if currently 100 players are playing or if 99 different players have been playing an the 100th player joins?
     
  3. Offline

    oceantheskatr

    @Daniel #Play4Austria They mean that they want a counter for every unique login. You should make an arraylist in the config for @Kody_Jay to define which milestones they want the message to show for.

    @Kody_Jay I'm assuming that you'd want this plugin to show it at 50, 100, 250, 500, 1000, etc. or a custom defined interval. If not, let Daniel know.
     
  4. You could be right but lets wait for @Kody_Jay
     
  5. What I mean is, for every unique register, I want it to welcome them, then say if they are the 100th person to ever register to the server, it says something like:

    "Welcome PlayerName to the server! (#100)"

    And if someone else registers after them,
    it says:

    "Welcome PlayerName to the server! (#101)"

    I want a config.yml file to edit the message too, please :]

    like it announces how many players that have ever joined the server

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

    oceantheskatr

    @Kody_Jay Ah okay so you want it to display that message on EVERY unique join.
    @Daniel #Play4Austria if you want it, take it. If not, I can probably do it.
     
  7. Offline

    9UjtOAtcBA

    If you have AuthMe, you can set the "forceRegisterCommandsAsConsole: []" to the following:

    forceRegisterCommandsAsConsole:
    - scoreboard players add ?Tracker? TotalPlayers 1
    - tellraw @a {"text":"Player %p is the","color":"light_purple","extra":[{"score":{"objective":"TotalPlayers","name":"?Tracker?"}},{"text":"th Player!"}]}

    Now, allow me to walk you through what these commands do and how they work.

    "/scoreboard players add ?Tracker? TotalPlayers 1"
    Increases the score 'TotalPlayers' of the player '?Tracker?' by one. This is how many players have registered.

    "/scoreboard" -- The main command for managing scoreboards.

    "players" -- Tells the server to modify a player's score.

    "add" -- Tells the server to add to the score of the player.

    "?Tracker?" -- Tells the server to modify the score of this player. In this case, the score of "?Tracker?". Using Question Marks is a good habit, because sometimes, if you have certain systems in place, if a player logs in with an username, something can happen to that player's scores. This however is not possible with this setup, but it's a good habit.

    "TotalPlayers" -- This is the scoreboard objective name. Beforehand, you need to use "/scoreboard objectives add TotalPlayers dummy" in order to create this objective.

    "1" -- The amount to modify the score by. In this case, add "1" to the score.


    "/tellraw @a {"text":"Player %p is the","color":"light_purple","extra":[{"score":{"objective":"TotalPlayers","name":"?Tracker?"}},{"text":"th Player!"}]}"
    Broadcasts a pink message (I think this is the default join message color? Not sure, feel free to change it.) to all online players, saying that "Player <playername> is the <player-number>th Player!". For example, for the 143th player named Steve, it would say "Player Steve is the 143th Player!"

    "/tellraw" -- The base command. Sends raw JSON messages to specified players.

    "@a" -- Specifies the players to broadcast the text to. Can be any player name but "@a" is a Target Selector and means "All Online Players"

    "{"text":"Player %p is the","color":"light_purple","extra":[{"score":{"objective":"TotalPlayers","name":"?Tracker?"}},{"text":"th Player!"}]}" -- This is the JSON message. I will explain it in further detail below.

    { -- The opening curly bracket of the JSON. A JSON message will always start with this character.

    "text" -- This tells this section of the JSON to display text.

    : -- This separates the tag and the value. In this case, the tag telling the JSON to broadcast text, and the text to be broadcasted.

    "Player %p is the " -- This is the text that will be broadcast. %p is a placeholder added by AuthMe, and will display as the registered player.

    ,"color" -- This tag tells the JSON to use a specific color. By default, the color is white, but we want to set it to the same as your server's default welcome message.

    : -- This separates the tag and the value. In this case, the tag telling the JSON to use a specific color, and the color to be used.

    "light_purple" -- The color to be used. This color looks pink, which I think is the default Welcome Message color.

    ,"extra" -- This tells the JSON to add another group of tags. Right now we have the starting text, but we also need the number of players who have joined before, and the text after that.

    : -- This separates the tag and the value. In this case, the tag telling the JSON to add more tags, and the tags to be added.

    [ -- A square bracket. Since the "extra": tag is followed by a list, we need to use square brackets to enclose the list with.

    { -- A curly bracket. Since this is an object in the list, we need to enclose it with curly brackets.

    "score" -- This tells the JSON to get a specified player's score in a specific objective.

    : -- This separates the tag and the value. In this case, the tag telling the JSON to get a player's score, and the object containing the name of the player and the objective.

    { -- A curly bracket. Since we need to specify multiple tags for the tag "score", but it isn't a list, we need to enclose it in curly brackets.

    "name" -- This tells the JSON to get a player's name.

    :

    "?Tracker?" -- The name of the player whose score we are getting. '*' will display the score of whoever sees this message. We however want to get the amount of registered players, so we will get the score of

    ,"objective" -- This tells the JSON to get a player's score in a specific objective.

    :

    "TotalPlayers" -- The scoreboard objective we want.

    } -- This is the end of the player-score object. We need to enclose this object with curly brackets.

    } -- This is the end of an object in the "extra": list.

    ,{ -- The beginning of a new object in the "extra": list.

    "text" -- Again, tells the JSON to display raw text.

    :

    "th Player!" -- The text to display. Note that since these objects inherit attributes from the parent object, this is by default "light_purple" in color, and we don't need a "color": tag.

    } -- This is the end of an object in the "extra": list.

    ] -- This is the end of the "extra": list.

    } -- This is the end of the main JSON object. We're done!

    Combined with the default welcome message of the server, this should look like the following:


    Welcome Steve to <servername>!
    Steve is the 143th Player!
     
  8. Offline

    oceantheskatr

    @9UjtOAtcBA aaaaaand if OP doesn't want to install a plugin on their server primarily made for cracked servers, a simple plugin could be made in about half an hour that will work perfectly.
     
    ipodtouch0218 likes this.
  9. Offline

    9UjtOAtcBA

    I did not say "get authme", I said "if you have authme." It is entirely possible that the OP runs a cracked server.

    Note the word Register. Registering is mainly a thing on cracked servers.

    It is also entirely possible that the server is premium, however there are online-mode servers that use Authme or similar auth plugins for extra security.

    Instead of trying to somehow judge or blame me for suggesting something that is entirely possible to work and can be done in literally 2 minutes, how about you do something constructive instead?
     
  10. Offline

    oceantheskatr

    @9UjtOAtcBA Yeah you're right that it's entirely possible for OP to be running a cracked server. I didn't note that he used the word "register" although I am familiar with that being used to "sign up" for AuthMe on a cracked server. I've played on servers that use AuthMe as an added measure of security to prevent people's accounts being used too. I'm not trying to judge you. It is also worth to add that Bukkit Forums does not support cracked servers, so I like to believe that people are using premium until proven otherwise.
     
  11. Offline

    oceantheskatr

    Okay, I'll give this a shot soon then! :)

    Awesome! I just finished it! :)

    You are able to enabled and disable it in the config, as well as set what you want the message to be. Make sure to set what your default world is. If you're not sure, it's probably "world". You can check by going to your server's default directory, then clicking on the world folder that you think it is, and then seeing if there's a "playerdata" folder in there.

    You are able to use colour codes, and the variables %name% and %amount%. %name% will be replaced with the user's name, and %amount% will be replaced with the number of unique joins.

    The BEST part is that it's not going to start at #1. You've probably had at least 100 people join, and you wouldn't want the next person after the plugin is added to be #1. This plugin will check your playerdata folder to see how many people have joined the server, and then use that number instead! So if you've had your server for a few months and 3525 unique people have joined, then when you add the plugin the next new player will show as #3526.

    I hope you enjoy it!

    If you have any problems or requests, let me know and I'll try my best to do it.

    UniqueWelcome download link: https://www.dropbox.com/s/mpo054jtnfkjz8v/UniqueWelcome-v1.0.0.jar?dl=1
     
    Last edited: Sep 11, 2016
  12. Thank you so much!
    I will test it now and get back to you after! :D

    EDIT: It made no file when I reloaded the server
     
    Last edited: Sep 11, 2016
  13. Offline

    oceantheskatr

    Restart your server, never reload.
    Also, what game version are you on?
     
  14. Offline

    oceantheskatr

    Hey, did you ever get it working? :p
     
  15. Offline

    Kwright02

    don't forget to set the title with the filled tag
     
  16. Offline

    Liam Townsley

    Please add the filled tag.
     
  17. Offline

    UnseenMC

    Use EssentialsSpawn...
     
  18. Offline

    oceantheskatr

    Useless. You can not get the join number, which is what OP requested. PLUS I filled this request a few months ago so your comment was unnecessary.
     
    UnseenMC likes this.
  19. @oceantheskatr Sorry for not setting this post as filled, I found out I could do this by adding {UNIQUE} to my welcome message in the essentials config.
     
  20. Offline

    Skrubzy

    If you still have the source code, could you add another quick feature for me please?
    A way to run a command (Or multiple) When a certain amount of unique players have joined - Like a reward:
    Code:
    100: /give <player> cratekey | /msg <player> &a&l (!) &r&sHere''s your reward!
    200: /give <all> cratekey | /bc &a&l (!) &r&sHave a crate key!
     
    Last edited: Nov 17, 2016
  21. Offline

    oceantheskatr

  22. Offline

    Skrubzy

    When I join the server, it sends me a message saying "invalid" and also I have 2 join messages. I think one is the default Minecraft join message, but I don't know how to get rid of it?
    EDIT: I don't know what I did but the "invalid" went away
     

    Attached Files:

  23. Offline

    oceantheskatr

    @Skrubzy My bad! Removed the test message :p The "Skrubzy joined the game" is an Essentials message. You can redownload the plugin from the same link.
     
  24. Offline

    Skrubzy

    Okay, thank you!
     
Thread Status:
Not open for further replies.

Share This Page