RealMotd
RealMotd is advanced MOTD plugin. It offers you big amount of variables to use in MOTD, different MOTD every day, permission checking in motd and colors in MOTD.
Features
- Many many variables to use in MOTD
- Colorful MOTD
- Also /motd
- Group-specific MOTD
- World-specific MOTD
- Group in world specific MOTD ( CHECK PAGE QUICK START FOR MORE INFORMATION)
- 3 Modes: Single(only one MOTD within selected context), Daily(some days have special messages), Random(everytime player logs in choose something else)
- Checking whether player has permission in MOTD.
- Itallics,Bold,Underline, Strike & Rainbow!
Variables
This plugin offers you big amount of variables, so here you go!(please let me know if I forgot something)
- %player% - Name of player who has joined
- %nick% - Name of player who has joined. This may be colorful, contain prefix & suffix. Also, it's changeable.
- %world% - Name of world player has joined to
- %time% - Time in player's world.(0-24000)
- %weather% - Weather in world (rain or clear)
- %ip% - Player's IP
- %playerlist% - Online players
- %d% - Day of month in real life
- %mo% - Month
- %yr% - Year
- %h% - Hour
- %mi% - Minute
- %s% - Second
- %exp% - Experience
- %lev% - Level
- %totalexp% - Total experience
- %food% - Player's food level
- %x% - Player's X coordinate
- %y% - Player's Y coordinate
- %z% - Player's Z coordinate
- %op% - Whether the player is an OP
- %mode% - Game mode of the player
- ^example.example - Checks whether the player has permission example.example . The character ^ can be changed to something else.
- /n - New line in MOTD.
- %whitelist% - Whitelisted players
- %banlist% - Banned players
- %timestat% - Status of time (day | night)
- %allowednether% - Whether there is a nether enabled on this server (true | false)
- %allowflight% - Whether there is flight allowed (true | false)
- %serverip% - IP address of the server
- %serverport% - Port the server is listening on
- %serverid% - ID of the server (random number used for authentification)
- %env% - Environment type of the world where player is
- %nplayersonline% - Online players count
- %nmaxplayers% - Maximal count of players on the server
- %ptime% - Player's time (may be different from world's time)
- %ptimestat% - Same as timestat, but with player's time
- %worlds% - Worlds which this server is currently running
- %plugins% - Plugins running on this server
- %day% - Minecraft day
Commands
Commands can be used to set MOTD in-game. It's good for quick changing, but you're limited to 80 chars. Use /motd set <motd> to set default motd and /motd set <month> <day> <motd> to set a day-specific motd. While setting motd in-game, use /n for newline and colors stay the same.
Configuration
This plugin generates configuration file after its first run.
Configuration Nodes
transl.weather.clear - Translation for weather clear transl.weather.raining - Translation for raining transl.mode.creative - Translation for creative mode transl.mode.survival - Translation for survival mode transl.op.is - Translation for OP transl.op.isnt - Translation for regular player transl.permission.has - Translation for has permission transl.permission.hasnt - Translation for hasn't permission transl.time.day - Translation for day transl.time.night - Translation for night transl.env.nether - Translation for nether transl.env.sky - Translation for skylands transl.env.normal - Translation for regular world transl.flight.allowed - Translation for flight allowed transl.flight.denied - Translation for flight denied permission - The character which identifies, that the text next to it is permission verification motd.mode - Mode of motd. Must be one of these: Daily, Random, Single
Setting up MOTD
Setting up motd is very easy. Go to <your server's folder>/plugins/RealMotd where you find folder "messages".
- Daily mode - Different MOTD for special days. You need to create a new text file called: motd_[month]_[day].txt ,where you write your motd. For example, for 26th September, it'd be "motd_9_26.txt". You don't need to create MOTD files for every day. Only for those special ones. If RealMotd can't find such-named file, it displays the default file.
- Random mode - Random mode each time user logs in You need to create how much of txt files you like. Files don't even have to end with .TXT. This mode chooses random file from messages directory as MOTD.
- Single mode - One MOTD forever. Always chooses motd.txt from folder messages.
If you're confused, look at the example configuration file below
Example configuration file
transl.weather.clear: Clear transl.weather.raining: Raining transl.mode.creative: Creative transl.mode.survival: Survival transl.op.is: Operator transl.op.isnt: Player transl.permission.has: can transl.permission.hasnt: can't permission: ^ transl.time.day: Day transl.time.night: Night transl.env.nether: Nether transl.env.sky: Skylands transl.env.normal: Overworld transl.flight.allowed: can transl.flight.denied: can't mode: single
How do I use the configuration file like that???
There are lots of options how to make MOTD as you wish. This example configuration file can be used as following: [plugins/RealMotd/messages/motd.txt]
Hello %op% %player%! You ^can.mine mine blocks and ^can.build build. You ^can.fly fly. Time of server is %time%. That's %timestat%. It's %weather%.
Look at the result MOTD. I've attached two of them, so you can see which parts of MOTD are changing. The result MOTD for code like that would look like this:
Hello Player Tomsik68! You can't mine blocks and can't build. You can't fly. Time of server is 13536. That's night. It's Clear.
or this:
Hello Operator Tomsik68! You can mine blocks and can build. You can fly. Time of server is 1353. That's day. It's Raining.
Colors
There are more ways of using colors in RealMotd. You can choose which one you want to use using configuration file. For more information about colors, please look here.
If you need more complex MOTD example even with formatting and colors, go here
Addons
So you don't have enough? RealMotd API is big, so there are some plugins that are using it. Here's a list of such plugins:
- RealMotd-Messages - Implementation of Join & Leave message using RealMotd variables, colors & formatting!
- RealMotd-ServerList - Server list message(a.k.a. MOTD) using RealMotd power!
TO-DO
- Import groups from permission plugins
Developers' API
It's available at http:dev.bukkit.org/server-mods/realmotd/pages/developers-api-documentation/
This help is not complete
As this plugin is very customisable, you can try to figure out some trick with configuration, variables or colors. And if you don't know how to do something with this plugin, send me a PM, or email me at [email protected] . I like to help! Thanks and Enjoy!
Have a problem? Take a ticket!
If you wanna submit a bug, please take a ticket, so we avoid comments section mess ;)
Contact Author
If you wish to contact author somewhere else, you can do so on:
- Blog: http://tomsik68.github.io/
- Twitter: https://twitter.com/tomsik68
- E-Mail: [email protected]
- GitHub: https://github.com/tomsik68 (also, sources of all plugins!)
- Skype: Tomsik68
@Tyson_ot_NW
Yeah, you can use that option. Assuming registered users have node register.reg, set permission.has in your config to '' and permission.hasnt to 'You are not registered on forums. Go to http://forums.myserver.com to register' . Then, just add ^register.reg to your MOTD and it's done. You may experience unexpected problems with configuration file. Just post them here and I'll tell you what's wrong. Hope this helped you :).
Is there a way to have a different motd show depending on permission group? I would like my unregistered users to see a message about how to join the forums and register, and I would prefer my registered users not see it. It looks like there is a setting for it in the config.yml, but your documentation doesn't seem to include details on how to use it.
@gibbly96
Really? I didn't know it's possible. I'll take a look at it.
2012-05-12 19:49:59 [INFO] Punch3r [/62.158.154.163:4767] logged in with entity id 54 at ([world] 286.82125459360896, 63.0, 53.673289573930134)
2012-05-12 19:49:59 [SEVERE] Cannot load plugins/RealMotd/config.yml
org.bukkit.configuration.InvalidConfigurationException: while scanning for the next token
found character '\t' that cannot start any token
in "<string>", line 9, column 19:
raining: Regen
^
Caused by: while scanning for the next token
found character '\t' that cannot start any token
in "<string>", line 9, column 19:
raining: Regen
^
Hey. Can i use italic, bold and underlined too ? I see that on other servers. But how can i do that :( ?
Nice... Now all i need is RSS too :)
Possible memory leak: http://dev.bukkit.org/server-mods/realmotd/tickets/3-possible-memory-leak-cpu-overload/
@dogbig
It'll be prepared once R5 will be released.
not ready for R5.. damn
@wooperjm
"Have a problem? Take a ticket!"
Ran into a strange issue:
07:14:21 [INFO] RealMotd v0.3 07:14:21 [SEVERE] Could not pass event PLAYER_JOIN to RealMotd java.lang.NullPointerException at java.lang.String.replace(Unknown Source) at sk.tomsik68.realmotd.RMMotdManager.sendMotd(RMMotdManager.java:61) at sk.tomsik68.realmotd.RealMotd.sendMotd(RealMotd.java:127) at sk.tomsik68.realmotd.RMPlayerListener.onPlayerJoin(RMPlayerListener.java:17) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:260) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339) at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:129) at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:113) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:39) at net.minecraft.server.NetworkListenThread.a(SourceFile:94) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:516) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
Running Craftbukkit version git-Bukkit-1.8.1-R4-49-g6a48ef9-b1530jnks (MC: 1.0.0) (Implementing API version 1.0.0-R1-SNAPSHOT). Also, I'm using Whitelist (http://dev.bukkit.org/server-mods/whitelist/).
Thanks for any assistance/suggestions you might offer.
@FoxyToaster
If you're getting motd similar to "Hello! This is different message which is displayed only at...", it's default day-specific motd. You need to delete the other text file in "messages" folder.
Everytime I run the server it changes my motd back to the default one, am I just stupid?
@tomsik68
If possible it would be nice to be able to use different permissions, don't want to hand out op to everyone :P
@SirMonsterSlayer
Editing motd ingame is not possible now, but I'll add it soon. Multiple motds can be done by setting transl.op.has and transl.op.hasnt . You can set it like this:
[motd.txt]
%op%
[config.yml]
But you can't use : while setting something in config.yml, so I suggest you make one part for all and the rest will be for OPs and non-OPs different.
Can we edit this motd ingame ? also with new lines ?
Oh and what about multiple motd ? or rather 2 would be enough. One for normal user one for others^^