[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

    weasel5i2

    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.​

    Features:
    • 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:


    HelpCenter/spears.txt:
    Code:
    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:
    [​IMG]

    Here is an example of the text-wrapping feature. This is the help file I made:
    Code:
    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):
    [​IMG]

    for web-based helpfiles, the format is a single line in the text file consisting of
    Code:
    [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:
    Code:
    [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:

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

    Installation:
    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:
    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..)​

    Changelog:
    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.


    --W5i2
     
  2. Offline

    weasel5i2

    Updated OP with new version, changelog, and download links :)
    Sorry it took me a few days, been a bit busy lately with work..

    --W5i2
     
  3. Offline

    jmcneely

    @The_Nut I have no idea how to send a PM, I've never sent one before. So I'll just post it here. News.txt.
     
  4. Offline

    Plague

    NEVER use a plus sign in the CB tag, keep updating for latest RB.
     
  5. Offline

    The_Nut

    @jmcneely
    I am looking at your file and am able to reproduce it... I have no idea yet why it is doing it. I am trying to find out why.
     
  6. Offline

    jmcneely

    Take your time, I am in no rush. It is the only page so far to be doing this but if i run into any more odd pages, I'll report them and maybe it will help narrow down the problem.
     
  7. Offline

    The_Nut

    I found the (*&^* bug. It was where a line was already 60 characters long with no spaces in it and I tried to line wrap it. It threw itself into an endless loop, causing the server crash. Sorry about that.

    version 1.78 13-June-2011
    * 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.

    HelpCenter 1.78 Download Link

    tested with bukkit 818
     
  8. Offline

    Plague

  9. Offline

    weasel5i2

    Fixed it, also updated the OP to reflect v1.78 (download links, changelog)
     
  10. Offline

    jmcneely

    @The_Nut Thank you very much, I am so glad you're here to help.

    You might be mad at me, but I believe I found another bug or I am doing something wrong. I am nearing my end of my help center interface and I have ran into another problem. I have it set up with 4 folders for each of the 4 main groups. I am working on the 3rd group, Builder. I placed myself in Builder group in every users.yml i could find in the permissions folder. Yet, I keep getting the Citizen(the group below Builder) help center. I go check to see what group I am in with /help player and it tells me I am in group "[Citizen,Visitor,Builder,Citizen,Visitor,Builder]." Go back and check all the users.ymls again and everyone only has me with Builder under my name. I'm not sure if I am doing something wrong or just over looking something.

    Thanks again for fixing the *&^* bug, I really appreciate it.

    Edit: Nevermind, I believe I fixed the problem. I cut off the inheritance from Citizen to Builer. I think having the inheritance track going through 3 groups messes it up because I have it now set up with only 2 groups and everything works as they should.
     
  11. Offline

    Plague

    the title still says 818
    changelog has to show two latest versions without a spoiler
     
  12. Offline

    weasel5i2

    Err, seems I edited the thread but forgot to edit the topic title. Fixed now, along with the changelog. I'll go through my other (active) plugins and do the same.
     
  13. Offline

    erdrickk

    I am getting this error with the latest version..... what does it mean ?

    2011-06-17 10:49:49 [SEVERE] Could not pass event PLAYER_JOIN to HelpCenter
    java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.getAllGroups(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
    at net.weasel.HelpCenter.HelpCenter.doStringTokenReplacements(HelpCenter.java:447)
    at net.weasel.HelpCenter.HelpCenter.getHelpFile(HelpCenter.java:758)
    at net.weasel.HelpCenter.HelpCenter.ShowWelcomeMessage(HelpCenter.java:151)
    at net.weasel.HelpCenter.HelpCenterListener.onPlayerJoin(HelpCenterListener.java:17)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:243)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:96)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  14. Offline

    The_Nut

    could you please note the version of HelpCenter (not just latest) and the version of Permissions that you are using. I will need those to figure out why you are getting this error.
     
  15. Offline

    anstopa

    Hi, i have this same error, my version of helpcenter is 1.78 [latest]
    I'm using EssentialGroup manager and EssentialBrigde.
     
  16. Offline

    The_Nut

    The error is related to permissions and how i access it. Do you have Permissions installed? If so, what version is it?
     
  17. Offline

    anstopa

    I have EssentialBridge and it make FakePermissions, this is 2.3 version [860]
     
  18. Offline

    erdrickk

    I am using Help 1.78 and permissions 2.73 I believe
     
  19. Offline

    The_Nut

    @anstopa @erdrickk
    I believe I have found the cause of the error you have been receiving. I was able to reproduce it and eliminate the error on my end. Please let me know if it solves it for you.

    version 1.8.0 17-June-2011
    * Fixed error in determining what Permissions version was installed and choosing the wrong one.
    * added command to show versions of installed plugins. /helpp pluginversions
    * added commands to show the items that bukkit recognizes /helpitem <filter>

    HelpCenter 1.8.0 Download Link

    Example output of /helpitem <filter> (NOTE: if <filter> is not supplied, a list of all items will be displayed)

    /helpitem wood
    Bukkit v818: Known Items filtered by: wood
    --------------------
    block - 5 - WOOD
    block - 6:1 - SAPLING (REDWOOD)
    block - 17:1 - LOG (REDWOOD)
    block - 18:1 - LEAVES (REDWOOD)
    block - 43:2 - DOUBLE_STEP (WOOD)
    block - 44:2 - STEP (WOOD)
    block - 53 - WOOD_STAIRS
    block - 64 - WOODEN_DOOR
    block - 72 - WOOD_PLATE
    item - 268 - WOOD_SWORD
    item - 269 - WOOD_SPADE
    item - 270 - WOOD_PICKAXE
    item - 271 - WOOD_AXE
    item - 290 - WOOD_HOE
    item - 324 - WOOD_DOOR
     
  20. Offline

    untergrundbiber

    /help without parameters doesn't work for me :(

    plugins/HelpCenter/HCdefault.txt is right or?
     
  21. Offline

    The_Nut

    if you are on a Linux system, it is much more picky about filenames. Try
    plugins/HelpCenter/hcdefault.txt
    or
    plugins/HelpCenter/hcdefault

    both should work.
     
  22. Offline

    rylinaux

    Suggestion: Integrate a list command (/help list). Currently, I have an entry created called list.txt, so a have a /help lis command. An integrated command would be much nicer.

    ~Ryan
     
  23. Offline

    Krispy

    I don't know if this is an issue with your plugin or bukkit, but color changes don't stick across word wraps for me.
     
  24. Offline

    The_Nut

    Unfortunately, that is a known issue, but i have not looked too closely at the color wrapping to see exactly what is wrong with it. I have had very little time to do so. When I get a chance, that is actually at the top of my list on things to correct.

    What did you want "/help list" to do? If you want it to list the installed plugins, "/helpp" will do that. If it is something else, please let me know how you are using the "/help list" command.
     
  25. Offline

    morizuki

    uhmm.. all player list?
     
  26. Offline

    DCBSupafly

    This mod is superAwesome and concisely documented. Thank you!
     
  27. Offline

    jmcneely

    I decided to take advantage of the new superperms and the new recommended permissions plugin. Unfortunately, I get this message on the console:
    Code:
    18:17:30 [INFO] [HelpCenter] Permission system not detected. '%prigroup%' and '%
    groups%' will be replaced with 'prigroup' and 'groups'
    I hate to ask but, can you please update?
     
  28. Offline

    elysianhero

    I think the link is broken :( Is this true?
     
  29. Offline

    Juze

  30. Offline

    jmcneely

    @elysianhero - Here, this is helpecenter v1.78 and works with build 1000 but doesn't work with the new permissionsbukkit-1.1. I'm still working with the plugin to get it to work with permissionsbukkit-1.1 but I'm new to the java world so bare with me.
     
  31. Offline

    The_Nut

    just a quick note, I have not had any time for quite a while to look at this. I will try to find some time, but it is far and few between. Have been having some personal issues that keep me from any programming. Sorry..
     

Share This Page