Pl3xMOTD
Description
Pl3xMOTD is a simple and small plugin that allows administrators to change their server's MOTD message and server-icon on the server list without restarting the server.
Fully Supports: color codes, multiple lines (in CB1.7.2+), random messages, random icons, and variables! Theres even an added color code to get a random color! Just use &x for a random color per motd ping.
Enjoy! ^_^
Custom server-icon.png
To use the custom server-icon feature you must create a new directory at "/plugins/Pl3xMOTD/server-icon/" and place your PNG file(s) here for the plugin to automatically use them. If more than one PNG file is in this directory one will be picked at random each time the server is pinged. The PNG files can be named anything and are not restricted to the "server-icon.png" file-name format.
Please be sure to use the correct standards for your PNG images (64x64 PNG). I have not tested non-standard images, but I'd assume only the top 64x64 portion of the PNG will be shown and anything not a PNG will not load at all.
To disable the server-icon feature just delete or rename "/plugins/Pl3xMOTD/server-icon/" and the default server-icon.png in the root directory will be used like normal.
Variables
You can use any of the following variables in your MOTD messages:
- {playerip} shows the player's IP address
- {playeruuid} shows the player's UUID
- {playername} shows the player's last known name
- {playerdisplayname} shows the player's last known display name (this will be just name if no display name was set)
- {version} shows the server version number
- {lastplayername} shows the name of the last player to join the server (displays "n/a" if no last player this boot)
- {lastplayerdisplayname} shows the display name of the last player to join the server
- {lastplayeruuid} shows the uuid of the last player to join the server
Default config.yml
Version 2.0
1 2 3 4 5 | # Enable debug info in console debug-mode: false # Enable colors in console output color-logs: true |
Default motds.yml
Version 2.0
1 2 3 4 | motds: - '&c{playername}, join us!\n&6We have cookies! &e:O' - '&eUUID&7: &b{playeruuid}\n&eServer Version&7: &b{version}' - '&bDisplayName&e: &7{playerdisplayname} &bName&e: &7{playername}\n&bIP&e: &7{playerip}' |
Commands
- /pl3xmotd (reload) View plugin version and/or reload config.yml from disk (Aliases: changemotd, servermotd, motd)
- /pl3xmotd (set) Replace all MOTD messages with a new one
- /pl3xmotd (add) Add a new MOTD to the current list
- /pl3xmotd (remove) Remove a MOTD from the list (you must type it exactly as it is in the motds.yml file)
- /pl3xmotd (clear) Clears all MOTDs from the file and reverts back to using the server.properties MOTD
Permissions
- pl3xmotd.command.pl3xmotd Allows access to the /pl3xmotd command
TODO
Multiple MOTDs cycled through randomlyAdded in v1.2Add ability to change the server-icon.png on the flyAdded in v1.3Add "motd" as a short aliasAdded in v1.3Add support for player names in MOTDAdded in v2.0Add commands to set MOTD in-gameAdded in v2.0
Suggestions? Leave a comment!
Metrics
This plugin uses metrics to collect stats! It only collect basic things such as version type, and players online. If you want to see everything, click on the graph. Go into /plugins/PluginMetrics/config.yml to disable stat collecting if you wish.
I think that /motd alias should be changed to something else as it conflicts with the Essentials /motd command.
I have reloaded the config and restarted my server and NONE of the MOTDs stay like I put them
@Hockeymikey
He's right if that's what you meant. Hopefully in the future Mojang can add support for 64x64 GIFs..
Also, Mikey, if you make a folder called "server-icon" in the "/plugins/Pl3xMOTD/" folder, you can have it cycle through server-icons each ping.
@Gulf22323
Probably not possible. The server icons are single pngs.
@Gulf22323
What?
Animated server-icon....
@Marium0505
Like I just said, use /n. I tested this and it works.
@tylerthecreeper1
You might want to change the top of the description then, the bit about newline not working in the plugin...
Any chance you could change it to \n?
@Marium0505
I'll consider adding commands in v1.5.
You can already use /n for a new line. Not "\n", but "/n".
Please add support for \n....
Edit: Can you also make it possible to change the MOTD using commands? Like /motd [motd] \n should work here as well.
Maybe even make it possible to use: /motd1 [text for line 1 in the MOTD] /motd2 [text for line 2 in the MOTD]
@BillyGalbreath
@BillyGalbreath
Thanks :)
Thought i'd mention rhe /n character works for multiple lines. Just realized i never updated the description to reflect this fix.
I have uploaded v1.4 which containts just a few changes to my liking. You can see them in the changelog.
It is awaiting approval from BukkitDev staff, and will work for any version of Craftbukkit 1.7.2-1.7.9. It will most likely still work with newer versions, but we will have to see once that comes around.
Hello everyone. My name is Tyler, and I will be taking over the project for BillyGalbreath. I will actively keep the plugin up to date and add new features I deem necessary as requested. That being said, please leave some suggestions in the comments, and I will gladly take a look at them and consider adding them to the to-do list. :)
Tylerthecreeper1 is taking over this project.
I'd like for me to change the MOTD with a command and not have to restart the server or reload the plugin config, that would be great ;) Thanks
@BillyGalbreath
I've got it loaded up on my server and have had no hitches from it. I usually only have one motd but I threw in a second for testing, both have newline statements in them with the spaces removed.
@ThisUsernameIsMine
I'm definitely adding this soon. I've been very pressed with time lately. My job has me working 60+ hours a week right now, and its hard to get motivated to work on my little time off. :S
@DizzyCraft
Thanks, and nice find! I haven't tested it personally yet, but I went ahead and merged it in since its such a simple fix and makes sense. Its build #10 on my jenkins page for anyone that wants to test it out and let me know if it works as intended.
Hello, just in case you don't see the update on bitbucket I put in a pull request to address the \n problem. Seems when it pulls it from a yaml file it puts another escape in \\n and that is why newline was not working correctly.
Should be good to go with the small modification I made.
Had to figure this out on a plugin that I'm making to modify the white-list message.