PlayerUniqueMOTDPings
Credit goes to the help of GusGold, Eats_Rainbows, and drtshock of the Bukkit forums.
THIS MAY HAVE NOT BEEN AN ORIGINAL IDEA, BUT WE WERE THE FIRST TO INTEGRATE BOTH FACES AND MULTILINE SUPPORT!
Update to Java 7!
Description:
Have you ever wanted to add a cool aesthetic to your server?
Me? Yes You!
Tired of pinging your server, and seeing your boring "My Boring Server" MOTD?
Lets change that...
This is how it works:
Average Joe pings your server for the first time ever. The server MOTD tells him, "Welcome Guest!", as a friendly greeting.
Your new player enters your game for the first time, and goes about his business. The next day, "Average Joe" pings your server again, and your boring MOTD has been changed to say, "Welcome Average Joe!". (or below, for example purposes)
Average Joe now feels special, and will tell all his friends to come play on your server...
THE END :P
Config:
Look for a folder named PPMOTD!
See examples.
Details:
This plugin is ultra-lite, uses low ram, and is very flexible. To Make it Work:
Step 1: Download. Step 2: Put it in your plugins folder. Step 3: Start your server. Step 4: Have fun :D
NOTE: Incompatible now, and will for ever be, with any other MOTD plugin.
Metrics:
This plugin utilizes Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
- You can disable the stat collection via /plugins/PluginMetrics/config.yml if you wish. (But that is not very nice :( )
How It Works:
When the players pings the server for the first time, his/her IP address gets logged into a HashMap. When the player joins the server, it grabs their IP address, and matches the two IP addresses.
Colors:
Just look at this picture from the Minecraft Wiki! This shows the available colors and formats for your MOTD (Don't recommend "k", or any other formats except color, unless you know what you are doing! Just put the letter or number behind the "&", and save.
_______________________________________________________________________________________
Examples:
motd: guest: '&bWelcome &r&a&lGuest!' member: '&bWelcome &r&6&l%p!' linetwo: '&ato the &r&5&nExample&r &6&nNetwork&r&a!' banned: '&4You (%p) are banned!' dofaces: true autoupdater: true
I will explain what each thing means carefully. Do faces means to enable or disabled face generation, use true or false. The autosaveinterval is how often the plugin saves its data, in seconds. NOTE: This will take some trial and error, if you are not familiar with MOTD plugins.
This line here, '&bWelcome &r&a&lGuest!'. Let's take apart what it means.
&b = blue color &r = reset color format &a = green color &l = bold
The &b defines that the color at the beginning is blue. When you want to switch colors and formatting, you use &r (otherwise know as reset). When you want to use another formatting symbol, like the bold underline. The formatter comes before the color, or it wont work. When you want to for example make something bold and orange, you would do "&r&6&lWhatever" Then it would turn out as.
Whatever
If you want to place the players username somewhere, you use %p.
_______________________________________________________________________________________
Auto-updater:
It does exactly what the name implies. It should work, but it might not. There is a new line in my config file, for enabling or disabling. Check the config file section for information about plugin defaults.
Bugs:
- none.
Tell your friends, spread the word if you like this! (or even +1 my reputation)
NOTE: If you want to change the guest ping picture from steve. Feel free too. I currently do not support the addition. Just open my plugin's jar in 7zip, and extract char.png. Edit the picture to your liking. Make sure it is 64 x 64. Then place the new picture (still named char.png) in the jar. You're done! Have fun.
@TheMysteriousYT
Will do nicknames next update. Also, I think you may be right on server restarts. The plugin has an autosave feature however and will save the data every 2 minutes. Are you using the latest build? As far as I have tested, the data is saved, and works for me when I restart my server. That could be possible server lag. - Blue
@Blue_Mustache
No, there is a difference between the player name and the display name. The player name is just your minecraft username. The display name can be formatted and changed. (with essentials nicks for instance)
And btw: player names don't save after server restart.
@Blue_Mustache
I have also been looking for something like this, that would be incredible.
@TheMysteriousYT
Please elaborate. To put the players name anywhere in your MOTD, in the config file put a %p where you want the name. Is that what you're asking?
Can you make it possible to have the display name appear in the motd? This would be really useful.
Achievement Get!
800+ downloads! Or should I say 850+. I am so happy, I can't believe the counter jumped 50 overnight! - Blue
New Update!
@keptlv
I have a dev build in motion. Just a little more tweaking and I will release a new update. It should be approved by Wednesday or so.
Is it possible to remove the avatar function? And leave only the default server icon?
Benchmark get!
700+ downloads! Cool. I am so tired. :P
@paul988
Thank You very much, Glad you like it. The next update will be more a memory patch. However, I will certainly add a random MOTD feature to both lines. - Blue
Overall a great plugin, I'm in love with it but there is one thing missing. I have a suggestion to make it able to change the second line ever so often, like have a config with a lot of messages for second line and have an option to turn it on or off ofcourse. Also add an interval option so people can choose how long the delay is between each change. I don't know if it is possible but if it is it would be a really neat idea. Love the plugin so far, one of the best MOTD plugin out there! :)
@FabioZumbi12
My plugin crops it though, and displays the face of the player w/ mask. But thanks, and great!
@Blue_Mustache
Oh yes, now is working fine, probally is a temporary problem with their webserver, but this option sounds cool!
Your link points to avatar, and not only head. The minotar points to only head, i like this.
ThankYou!!
@oliver276
When you reload, it doesn't call onDisable. The code I have now (which is perfectly fine), makes sure the plugin has time to save, then the server reloads.
@oliver276
I originally did it just on disable.
@PatoTheBest
It is not. Just type /reload, and it will remember for the time being. I will add an auto save, that will save to disk every 2 minutes, in the new update.
@Blue_Mustache
Just call the saveData(); (if this saves the HashMap) in onDisable{} I believe onDisable is called for reloads and restarts, but not with PlugMan.
Also try writing instantly to the file; then it won't matter how it stops.
@Blue_Mustache
The reload serms complex.
Benchmark get!
600+ downloads. Thanks guys! Hope you like the new update. Just comment with any questions or concerns.
- Blue
@OrbisGaming
I hope you downloaded the latest version. The latest version I released here has a data retention update. The server will save all of the IPs of that session to a file called "pingdata". The server then loads that contents of that folder into the plugin on start. If the pingdata is corrupted, then it will need to be replaced. I spent 8 hours working on data retention, and testing it. Bottom line: it works. However, only reload the server from and opped player issuing "/reload". If you however run "/reload" from the console, my plugin can't do anything about it ATM to save the data. In the future I will make an auto-save feature for the IPs. For the time being, only issue "/reload" from your player, to reload the plugins. If you are confused about why, I can tell you. You may be confused however, if you are not a Java programmer. Here is the proof about the /reload.
If the /reload command is issued, the plugin has no time to save the data, and it is erased. If the player issues it, I can cancel it from being issued, then It saves the data, and reloads the server. WARNING: If the HashMap that is holding the data is erased, It will write over the save file on disable. I will however have many features to keep that from happening, and I will unleash a global effort of social engineering on the bukkit website, to allow me to make a database of IPs, that will phase out the save files.
Thanks for downloading everyone! - Blue