HelpMessage
HelpMessage v0.6
Helping people without lifting a finger!
Hello everyone. This is my first (released) plugin for bukkit. I designed this to help curb the constant stream of questions admins and mods have to deal with regarding ingame mechanics and server-specific information such as plugins.
HelpMessage is fully customizable - you can set any number of messages, and they will be displayed at random at a preset interval. You can change the interval, the color of the brackets around "HelpMessage", the color of the title, the color of the message, and the name of the plugin itself (for ingame purposes).
Currently, only ops can change settings/messages, but I will be including permissions in the next release.
Be sure to check out my other released plugin, TreasureHunt, and help me get it moved to releases! See my signature!
Commands:
- /hm - displays information on the interval and number of messages currently loaded by the plugin.
- /hm <messageid> - display the message identified by the id.
Op Commands:
- /hm delay <seconds> - set the interval between help messages. Ex: /hm delay 300
- /hm add <message> - add the message to the list of messages Ex: /hm add To go to spawn, type /spawn.
- /hm remove <messageid> - remove the message from the list of messages (message IDs are displayed in the chat tag for the message broadcast, i.e. [HelpMessage 12] is the 12th message). Ex: /hm remove 12
- /hm check <messageid> - same as the /hm <messageid> command. This will probably be deleted.
- /hm display <messageid> - broadcasts the specific message to everyone. (The interval will start counting from zero again. This does not affect the last displayed message in a sequential system.) Ex: /hm display 2
- /hm bracketcolor <colorid> - sets the color of the brackets in [HelpMessage]. Ex: /hm bracketcolor 2 Ex: /hm bracketcolor a
- /hm titlecolor <colorid> - sets the color of the title in [HelpMessage]. Ex: /hm titlecolor 6
- /hm messagecolor <colorid> - sets the color of the message after the tag.
- /hm title <title> - sets the title of the plugin to the entry (no spaces allowed). I.e. IngameHelp or HelpingYou or whatever. Ex: /hm title HelperBot
- /hm sequential <true/false> - sets the plugin to display sequentially(true) or randomly(false).
- /hm save - saves the current message list and settings to the yml file.
- /hm load - loads the message list and settings from the yml file.
Planned Features:
- Permissions support
Known Bugs:
- None!
Changelog:
Version 0.6
- Fixed a minor error handling message numbers when you are not an OP.
Version 0.5
- Added standard color handling in messages - &1, &2, etc. Enjoy :)
- Updated to CB 1.2.3
Version 0.4a
- Bugfix - NPE on first run of the timer from having no messages in the list
- Bugfix - Index out of range exception if running sequential and having removed messages while the last message read was near/at the end of the list
Version 0.4
- Updated to CB 1337.
Version 0.3a
- Updated to CB 1185.
- Made special improvements to the plugin to allow it to broadcast despite the current build's broadcast bug.
- Added a function to display the messages sequentially instead of randomly.
Version 0.3
- Released!
Hi Taien1,
I just installed your plugin, added a single message and set random order display with 10 second delay. The message was never displayed.
I added a second message and then it displayed the first message every 10 seconds. (but never the second)
I added a third message and it then randomly displays the first two messages, but never the third.
If I switch to sequential=true then it goes through all messages as expected.
Possible bug with the random selection? Would seem the highest message ID is never selected.
@CosmicVoyager
This is caused by you attempting to do save when you are not an OP. The plugin currently only supports op-based permission. I'm uploading a fix version that return an error when you attempt to do this instead of causing the NumberFormatException in console.
using 1.2.4
22:56:19 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'hm' in plugin HelpMessage v0.5 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.NumberFormatException: For input string: "save" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at me.taien.HelpMessage.onCommand(HelpMessage.java:145) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more
Version 0.5 released :)
This version includes color handling in messages (use standard &2, &3, etc). It also works in the current build. Any other suggestions, let me know :)
Permissions in next version. I'll use Vault like I do for everything. Vault is awesome. Anyway, enjoy. :)
This plugin will be updated soon. I've been busy with other things but have been getting lots of messages about it so I'll make an effort to update it in the next few days. :)
I really need an update! Server Members are getting impatient for 1.2.3!
plz update
update please
Please add permissions support so that certain help messages are available to only certain users.
This is the second awesome announce plugin thats out of date like ScheduledAnnouncement.
Cmon guys you can do it, update thse plugins pleas!
Hey, there's an RB for minecraft now, update to 1.0.0 if you have the time. Thanks!
Is there a way to remove the Message ID when broadcasting?
[HelpMessage 1] Test [HelpMessage 2] Hello
Thank you!
You will update to 1.0.0? Or when CB do a recommende build?