[INACTIVE][INFO] HelpCenter v1.78 - A Flat and HTTP Helpfile/Topic Server [860]

Discussion in 'Inactive/Unsupported Plugins' started by weasel5i2, Feb 10, 2011.

  1. Offline


    HelpCenter - A Flat and HTTP Helpfile/Topic Server:
    Version: 1.78

    Description: **COLOUR CODES have CHANGED! See below...**

    This plugin allows you to serve any number of textfiles (and/or web-based texts) as help topics, using the /help command. The help files are placed in the HelpCenter/ folder, and their existence determines their availability within the game. Since the plugin reads the files each time it is invoked, any changes to the textfiles will be reflected immediately in-game. Note that the filenames must contain only characters which are enterable into the Minecraft client. It can also fetch helpfiles from a web server (the files must be in text/plain format, it will not strip out HTML tags or any weird characters, or do any unescaping() so make sure your help page(s) are returning plain text.)​

    If you create a file called HelpCenter/welcome.txt, it will be displayed to every user upon login. This is handy for displaying a message like "Type /help topics for a list of help topics." and so on..​

    If the file contains a specially crafted URL line (see below) then it will fetch the contents of a web page via the URL and return that to the player instead.​

    If the folder ./HelpCenter doesn't exist, it will be created when you first run the plugin.​

    • Compatible with Craftbukkit running Minecraft 1.3x
    • Word-wrapping for those long lines of text
    • Dynamic: any changes to the helpfiles are reflected immediately to the players.
    • Directory traversal protection (trying "/help ../../../../../../../etc/passwd" will not work)
    • This plugin will support as many helpfiles as you can possibly create.
    • It can fetch web-based helpfiles via HTTP. :)
    • C o l o u r s ! (see codes below)
    • Default helpfile with randomly-chosen help item capability (otherwise will pass-thru the /help command if typed in without any arguments)
    • Helpfile redirection!
    Example help files:

    Spears are long and pointy. They can be used to stab things.
    You can also throw them or use them to roast hot dogs.
    ..will result in this when the player types /help spears:

    Here is an example of the text-wrapping feature. This is the help file I made:
    The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.
    ..and here is the line-wrapping (it ended up being split into four separate lines):

    for web-based helpfiles, the format is a single line in the text file consisting of
    [URL http://some.site.url.here..]
    e.g.: [URL http://bananas.are.nice] or [URL http://so.are.raspberries].

    If you want to make it so players can use the above example by typing "/help spear" as well, simply create a file called spear.txt and insert this redirection line:
    [HELP spears]
    This way, you only need to update the original spears.txt to make changes to all linked helpfiles.

    Keywords (replaced by values) - If a help file contains any of the blue keywords listed below, they will be replaced by the following values, respectively:

    • %user% - Bukkit - player - The players name
    • %world% - Bukkit - player - The world the player is in
    • %health% - Bukkit - player - The players health value (0 = dead, 20 = full health)
    • %locx% - Bukkit - player - The players location X
    • %locy% - Bukkit - player - The players location Y
    • %locz% - Bukkit - player - The players location Z
    • %iteminhandid% - Bukkit - player - The ID of the item the player has in hand
    • %iteminhand% - Bukkit - player - The item the player has in hand
    • %isop% - Bukkit - player - Is the player an OP - "YES" or "NO"
    • %serveronlinecount% - Bukkit - Number of players currently on server
    • %serverver% - Bukkit - version of the server
    • %groups% - Plugin - Permissions - The list of groups to which the player belongs.
    • %prigroup% - Plugin - Permissions - The first group returned by Permissions to which the player belongs.
    • %helpver% - Plugin - HelpCenter - Version of the plugin
    Colour Codes:

    To use colours, simply add the following codes anywhere in the text file. They will be parsed out and replaced with the proper codes:​

    &0 = black, &8 = black (hi) = dark grey
    &1 = blue (lo), &9 = blue (hi)
    &2 = green (lo), &a = green (hi)
    &3 = cyan (lo), &b = cyan (hi)
    &4 = red (lo), &c = red (hi)
    &5 = magenta (lo), &d = magenta (hi)
    &6 = yellow (lo), &e = yellow (hi)
    &7 = white (lo) = light grey, &f = white (hi)

    Default Helpfile / Random Help Items:
    If you create a file called HelpCenter/HCdefault.txt (case-sensitive) it will display the contents when the player types /help without any parameters. You can also put multiple items, separated by #!HELP (on its own line) and the HelpCenter will randomly select one of the items and display it to the player when they type /help without any parameters. Otherwise, if HCdefault.txt doesn't exist, it will pass-thru the /help command and return the default Minecraft help text.​

    Example HCdefault.txt:

    There are many help topics available. Please be more specific?
    Help me Rhonda!
    Here's a hint: /help topics
    I'm sorry Dave, I can't help you.

    1. Copy the file HelpCenter.jar into your plugins folder.​
    2. Run the plugin at least once to create the HelpCenter/ directory.​
    3. Create your help text files as described above.​

    Download The Plugin (JAR) v1.78 or..​
    Download The Plugin (ZIP) v1.78​

    Source is at Github ^_^​

    Older Versions (Why you'd want them, I don't know..)​

    Version 1.78 13-Jun-2011 The_Nut
    • Fixed issue where long line without spaces was not displayed to user in console or ingame and caused the game to crash after a short while.
    Version 1.77 06-Jun-2011 The_Nut
    • Added additional key word replacement:
      %armor% - Bukkit - player - The players armor durability value (0 = none, 20 = full armor not damaged)

      Just a note, if you open up the .jar file you will see the README which is the change log and a player.txt file. The player.txt file is a sample help file with all the keyword replacements so you can see how it works.
    < 1.77:
    Show Spoiler

    Version 1.76 04-Jun-2011 The_Nut
    • Updated to work properly with permissions version 3.0+.
    • Fixed display of message on player login so it has proper line wrapping.
    • Tested and working well on my system CB 803 with permissions 2.7.2
    • Tested and working well on my system CB 818 with permissions 3.1
    Version 1.75 23-May-2011 The_Nut
    • Added more key word replacements (see list above)
    Version 1.73 10-May-2011 The_Nut
    • Add Javadoc, Cleaned up additional code.
    • Allow for HelpCenter to be used in console.
    • Fixed buildHelpFiles and buildPlugin commands to be more robust and consistent in building help files.
    • Added command helpp to pull help file information directly from the server's installed plugins.
    • Cleaned up internal code
    • Fixed line wrapping so it will not count chat color codes as part of the 60 char limit per line.
    Version 1.72c 05-May-2011 The_Nut, weasel5i2

    • Changed the colour codes to fit the accepted standard. I apologise if this broke all of your helpfiles!!
    • Incorporated changes by The_Nut (via Github merge)
    • Recompiled against latest recommended Craftbukkit build #740.
    Version 1.72 30-Mar-2011 weasel5i2

    • Recompiled against latest recommended Craftbukkit build #602.
    Version 1.71 21-Mar-2011 weasel5i2

    • Fixed a minor bug with the colour code parsing
    Version 1.7 18-Mar-2011 weasel5i2

    • Recompiled against latest recommended Craftbukkit build #556.
    • Added line-wrapping functionality for long lines
    Version 1.61 09-Mar-2011

    • Recompiled against latest recommended Craftbukkit build #522.
    • Fixed the CommandSender issues. Sorry about the inconvenience. :)
    Version 1.6 08-Mar-2011

    • HelpCenter folder now moved to plugins/HelpCenter. This should happen automatically. If you have an empty plugins/HelpCenter folder and all your helpfiles are in HelpCenter then simply delete the empty folder plugins/HelpCenter and restart the server and it should move it properly to the new location.
    • Complete rewrite of helpfile content handling.. Now nested help keys URL/HELP work properly (and infinitely, try not to make any infinite helpfile loops! :D)
    • Recompiled against latest recommended Craftbukkit build #493.
    Version 1.5 03-Mar-2011

    • Removed deprecated PLAYER_COMMAND code, replaced with the new onCommand() method.
    • Fixed /? to work the same as /help.
    Version 1.4 27-Feb-2011

    • Recompiled against Craftbukkit build 440
    • Added helpfile redirection capability.
    • Added informative console output error messages.
    • Now sends "No help found for ___." to player if an error occurs (malformed redirector/url formatting, file errors, etc).
    • Removed the need to add a space before the closing ] bracket. Both ways will work now. (e.g.: "[URL http://web.site/help.file]" and "[URL http://web.site/help.file ]" will both work)
    Version 1.31 24-Feb-2011

    • Removed stupidly long constructor and compiled against Craftbukkit build 432
    Version 1.3 15-Feb-2011

    • Fixed bug in which all PLAYER_COMMAND events were being intercepted and mishandled.
    Version 1.2 14-Feb-2011

    • Added colour capability (see codes above).
    • Added default helpfile random item capability per user request.
    Version 1.1 11-Feb-2011

    • Added web-based help fetching capability (see notes above)
    • Removed command case-sensitivity. Filenames must be in lowercase (excepting HCDefault.txt as described above).
    Version 1.0 10-Feb-2011

    • Created plugin.

    To Do:
    • Any suggestions? :)
    Please let me know what you think, if there are any issues or if it doesn't play nicely with the other plugins. It should, though. Also, it doesn't use any super-special classes, just the basic ones, so I'm certain this should work with most earlier versions of CraftBukkit. Suggestions are always welcome.

  2. Offline


    I really like it, replaced the old variant I had installed with this ;)

    The only thing I can think of right now, is typing just /help displays nothing...

    Would it be possible for something like this?
    If the HelpCenter folder does not exist, it creates it as well as a default helpfile with a random default message of choice, which is displayed when using /help without parameters?

    I'm horrible at explaining, but I hope it's clear enough :)
  3. Offline


    I think I know what you mean, and have implemented it in version 1.2. Hopefully that's what you wanted! :)

    Colours now available too!

  4. Offline


    Beyond perfect!

    Looking forward to any other updates you may have available in the future, highly appreciated :)

    Edit & Update
    It seems that somehow, helpcenter is hooking into other commands that have no parameters, don't know how or why :p

    MultipleHomes is one, using /home displays the generic "/help", same for some in worldedit etc.
  5. Offline


    I just noticed that too.. Fixing it now for v1.3 :)

    Update: Fixed it!

  6. Offline


    And all seems to be well in the world, again :)
  7. Offline


    This is so nice, really easy to use and manage. Thanks!
  8. Offline


    Edit: Forgot to add the praise! I love this plugin! Sometimes plugin devs don't include a help section, or the help section isn't very player-friendly, so this lets me make my own.

    Would you be able to set up a redirect syntax for helpfiles? For example:



    So if I have a help file called warp.txt, but my user types /help warps -- it would still show them the warp.txt help file.
  9. Offline


    I agree with Agnate on this one, redirectional help files :)
    Also, update the plugin before it stops working sometime tomorrow... think there was talk about this :p
  10. Offline


    That's a great idea, I will implement it in the next version ^_^
  11. Offline


    Wow another amazing plugin you have made, thank you very much I always hated the information that /help would give.
  12. Offline


    the 454 oncommand broke the plugin :/
  13. Offline


    Hmm, not sure about the b454 error, could you please post the error log stacktrace? It may be a moot point, as I've updated it to build 440 and this might have fixed the problem.. I added the redirection thingy too, Agnate! :)

  14. Offline


    Awesome, thanks! Again, a fantastic plugin. I can't praise it enough!
    weasel5i2 likes this.
  15. Offline


    Oh no!

    We're running Craftbukkit build 477.
  16. Offline


    same one.
  17. Offline


    I was getting that error, so I rolled back to the version before they removed PLAYER_COMMAND.

    It works fine if I type "/help welcome" though, so it must be a Bukkit issue. Oh well!

    On another note, one of the Bukkit patches somewhat fixed the text formatting issue, but it's still broken for the Welcome text. Is it possible to fix it on HelpCenter's end, or should I just file it in the bug list on the Bukkit area?
  18. Offline


    Having the same issue with PLAYER_COMMAND, as everyone else... other than that, awesome work on the previous update :)
  19. Offline


    Update it, please, this plugin was amazing, really useful =/
  20. Offline


    I'll replace the method tomorrow (that is, today) and release a new one :)

    (I didn't get a chance to get to it yesterday, heh)

    EDIT: Updated!
  21. Offline


    Still broken...
    2011-03-04 16:05:10 [SEVERE] PLAYER_COMMAND loading HelpCenter v1.5 (Is it up to date?)
    java.lang.NoSuchFieldError: PLAYER_COMMAND
    	at net.weasel.HelpCenter.HelpCenter.initHelpCenter(HelpCenter.java:227)
    	at net.weasel.HelpCenter.HelpCenter.onEnable(HelpCenter.java:44)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  22. Offline


    This is a cool idea. Also Weasel5i2 what texture pack was used in the screenshot?
  23. Offline


    @TerraPlay: bizarre! I'll take a look and see if I probably accidentally left in the event hook line.. EDIT: heh, that's exactly what I did. It's fixed now, please re-download it and it should work. Hopefully they didn't deprecate PLAYER_JOIN too.

    @instinx: It's Misa's HD texture overhaul from here (Minecraft Forums) - it's pretty awesome, 64x64 textures :)

    Still trying to get MrM's SimpleMap working on my 1.3_01..
    --- merged: Mar 4, 2011 11:21 PM ---
    I'm going to update this to build #493 and also move the HelpCenter folder into the proper location (plugins/HelpCenter). I'll make the plugin do that on its own so server admins won't have to worry about the upgrade process..
  24. Offline


    I do have to say, You got some competition from Help and it seems promising.
  25. Offline


    Is there any way we can use #!HELP in any document rather than HCdefault.txt?

    Like make a random jokes page or something?

    #!r Why did the chicken cross the road?
    #!g to get to the other side!
    #!r What do you call a computer that likes cotton balls?
    #!g Microsoft

    (Yeah I know they are bad)
  26. Offline


    @Anoniempje: Mine's easier to use and configure though, and as far as I know, mine is the only one able to fetch helpfiles via HTTP :)

    @LuckyMonkey: Great idea, I will implement it into the next release!
  27. Offline

    Matt L

    Ummm well this is really weird, but whenever I log into the server, my players cannot view the help. Whenever they use the command it is sent to me. I tried 2 differnt accounts. 1 the owner 2 an admins account. same computer both times. what would cause this?
    --- merged: Mar 6, 2011 9:03 AM ---
    lowered account to user as well, didnt work. its as soon as there is 2 players on the server...
    --- merged: Mar 6, 2011 9:06 AM ---
    logged on 2 accounts at same time to bring 3 people on, went to one computer then the other when he logged out...
  28. Offline


    Running into the same issues as Matt L here.
  29. Offline

    Matt L

  30. Offline


    We'll have to wait for weasel5i2.

Share This Page