Inactive [INFO] Help 3 - a Smarter /help [1060]

Discussion in 'Inactive/Unsupported Plugins' started by jascotty2, Apr 19, 2011.

  1. Offline

    jascotty2

    Help - The Smart /help Menu
    Version: 0.3.2
    Download: Help.jar

    This is a new thread for the Help version that i maintain
    (tkelly hasn't been on for about a month as of this submission, and no updates to his version since 531)

    Version 0.3 is (finally) out! :D

    (any suggestions for what to work on next are welcome ;) )


    Help has support for both GroupManager and Permissions, so you can use either one. You can also use neither if you so choose. Help will not force you to any which one.

    What is Help?
    Help is a clean and advanced /help menu. Help separates "main" commands from secondary ones, allowing you to have a clean initial menu, but still able to dig down and get access to every possible command.

    It is also the first /help menu to take into account permissions; some commands simply aren't applicable to all users, so those commands should clearly not be visible to those users. Now, default users' help menus won't be cluttered with commands for admin tools they have no way of using.

    Scroll down for a preview, or see below for how to hook into Help :)

    Help Commands
    /help (#) : Shows the /help menu.
    /help http://dev.bukkit.org/bukkit-plugins/ (#)[/I][/B]:[/FONT] Shows all the help entries for [I][plugin][/I]. [B][FONT=courier new]/help plugins[/FONT][/B] : Shows a list of all the plugins with Help entries. [FONT=courier new][B]/help search [I][query][/I][/B][/FONT] : Searches for [I][query][/I] within it' entries. [B][FONT=courier new]/help reload[/FONT][/B] : Reloads the entries from ExtraHelp.yml. [SIZE=5][B][FONT=helvetica]Plugin Support[/FONT][/B][/SIZE] Help requires that plugins tell Help about the commands they use. This makes sure that the commands and permissions are accurate and precise (rather than trying to auto fetch commands). Because it's ridiculous to assume that all plugins will instantly jump up and support Help (we can dream can't we? :D), server admins can mimic this behavior by supplying... [SIZE=5][B][FONT=helvetica]Custom ExtraHelp/[/FONT][/B][/SIZE] I'll also cover how you can add custom commands to the /help menu here. Each command has a "name", this name is only for you, as Help doesn't care about it (they just need to be unique names). In the following example the names are 'versions', 'pluginversions', 'kick' and 'essentialswho'. Within these Nodes you [FONT=Georgia][U][I][B]need[/B][/I][/U][/FONT] [B][SIZE=4]2[/SIZE][/B] things: command, description, [SIZE=2][S]and plugin[/S][/SIZE]. These should be self-explanatory. The two optional pieces are "main" and "permissions" [INDENT=1]The previously required "plugin" node has been replaced by the filename itself.[/INDENT] [INDENT=1]so if you have entries for "Minecraft", put those entries within "Minecraft.yml" in help's ExtreHelp folder.[/INDENT] [INDENT=1]If you have many commands & don't want them cluttering the same file (like worldedit), you can put them in a folder instead (the folder name will be the name used for plugin)[/INDENT] If you specify a "main", you can choose whether or not the command is important enough to show up on the main /help menu; if you leave it blank or skip it, it will default to 'false' If you specify a "visible", you can specify whether the command shows up at all. This is useful for overriding other plugins' built-in Help support (in case you don't want all the commands); if you leave it blank or skip it, it will default to 'true'. If you specify a "permissions", you can choose what is necessary for the user to see the command; and leaving it blank will allow all to see. So in the case of /version, all users can use it, so no permissions. But with /who, you have to have essentials.list, so that was specified. There is also a special permission case, "OP". By specifying this, this will require the user to be an OP to use the command (as is the case with Minecraft's built-in /kick command). [code] versions: command: version description: Show the version of Minecraft and CB plugin: CraftBukkit main: true pluginversions: command: version [plugin] description: Shows the version of [plugin] plugin: CraftBukkit kick: command: kick [player] description: Kicks [player] from the server plugin: Minecraft main: true permissions: OP essentialswho: command: who description: Show who's one the server plugin: Essentials main: true permissions: essentials.list [/code] [B][SIZE=5][FONT=helvetica]How To Hook into Help.[/FONT][/SIZE][/B] [spoiler="API"] Hooking into Help is extremely easy, and very similar to hooking into any permission-plugin. When your plugin is starting up, just grab the Help plugin and register your commands with Help's registerCommand() method; that's it! Here's the API and some examples. If you'd like a concrete example, check out the relevant source code from [URL='https://github.com/tkelly910/MyHome/blob/master/src/main/java/me/taylorkelly/myhome/HomeHelp.java'][COLOR=rgb(16, 97, 179)]MyHome[/COLOR][/URL] and [URL='https://github.com/tkelly910/BigBrother/blob/master/src/main/java/me/taylorkelly/bigbrother/BBHelp.java'][COLOR=rgb(16, 97, 179)]BigBrother[/COLOR][/URL]. [SIZE=4][FONT=helvetica][B]Help API[/B][/FONT][/SIZE] [code] /** * Registers the given command, description, and plugin. * There are no permissions, so all users can see it. * It is also not a "main" help entry. * @return Whether or not it was successful */ public boolean registerCommand(String command, String description, Plugin plugin); /** * Registers the given command, description, and plugin. * There are no permissions, so all users can see it. * You can set whether the plugin is a "main" entry or not * @return Whether or not it was successful */ public boolean registerCommand(String command, String description, Plugin plugin, boolean main); /** * Registers the given command, description, and plugin. * You can specify one or more permissions. * If a user has permissions for at least (1) of them, he can see this command * It is also not a "main" help entry. * @return Whether or not it was successful */ public boolean registerCommand(String command, String description, Plugin plugin, String... permissions); /** * Registers the given command, description, and plugin. * You can specify one or more permissions. * If a user has permissions for at least (1) of them, he can see this command * You can set whether the plugin is a "main" entry or not * @return Whether or not it was successful */ public boolean registerCommand(String command, String description, Plugin plugin, boolean main, String... permissions); /** * Gets the help text associated with this command * @param command the command to lookup * @return help text, or null if none */ public String getHelp(String command); /** * Gets all of the commands registered with this plugin * @param plugin plugin to lookup * @return list of commands */ public ArrayList getPluginCommands(String plugin); [/code] [SIZE=4][FONT=helvetica][B]Basic Example[/B][/FONT][/SIZE] [code] // plugin is the instance of your Plugin registering the commands Plugin test = plugin.getServer().getPluginManager().getPlugin("Help"); if (test != null) { Logger log = Logger.getLogger("Minecraft"); Help helpPlugin = ((Help) test); // Registers a main command. But all users will be able to see it helpPlugin.registerCommand("home help", "Help for all MyHome commands", plugin, true); // Registers a secondary command to our plugin (MyHome), but the user has to have the permission to see it helpPlugin.registerCommand("home", "Go home young chap!", plugin, "myhome.home.basic.home"); log.log(Level.INFO, "'Help' support enabled."); } else { Logger log = Logger.getLogger("Minecraft"); log.log(Level.WARNING, "'Help' isn't detected. No /help support."); } [/code] [SIZE=4][FONT=helvetica][B]Slightly More Advanced Example[/B][/FONT][/SIZE] [code] Help helpPlugin = ((Help) test); String[] permissions = new String[]{"bb.admin.watch", "bb.admin.info", "bb.admin.rollback", "bb.admin.cleanse"}; // If a user has any one of those permissions, they'll be able to see /bb help. A main command helpPlugin.registerCommand("bb help", "Help for all BigBrother commands", plugin, true, permissions); // If a user has "bb.admin.watch" they'll be able to see /bb watch [player]. A secondary command helpPlugin.registerCommand("bb watch [player]", "Toggle the watch on [player]", plugin, permissions[0]); [/code] [/spoiler] [FONT=helvetica][SIZE=5][B]Plugins with Help Support[/B][/SIZE][/FONT] Here's a quick list of plugins (and version) that have built in Help support. - MyHome v1.9.2+ - MyWarp v1.10.3+ - BigBrother v1.6.4+ - Citizens v1.0+ - General 3.1+ - TelePlus 1.6+ - Pixl 1.3+ - Vampire 1.3+ - BetterShop 1.6.2+ - Wormhole-X-Treme 0.812+ - Tele++ v1.3.4 [FONT=helvetica][SIZE=5][B]ExtraHelp Packs[/B][/SIZE][/FONT] [URL='https://github.com/FabianN/MC-Bukkit-HelpExtra'][COLOR=rgb(16, 97, 179)]FabianN put together a repository of entries for your ExtraHelp/ that represent other plugins' commands.[/COLOR][/URL] It's really awesome and was helped put together by others from the community. [SIZE=5][B][FONT=helvetica]Preview[/FONT][/B][/SIZE] [IMG]http://i.imgur.com/AE9cG.jpg[/IMG] [IMG]http://i.imgur.com/cII2X.jpg[/IMG] [SIZE=5][B][FONT=helvetica]Changelog[/FONT][/B][/SIZE] Version 0.3.2 - 7/21/11 [LIST] [*]lowered chat fill size.. should fix some wrapping issues [/LIST] Version 0.3.1 - 7/7/11 [LIST] [*]fixed NullPointerException on entry save when no permissions [/LIST] Version 0.3 - 7/6/11 [LIST] [*]fixed loading help & plugin help registering before plugin onEnable [/LIST] [spoiler="Changelog"] Version 0.3 beta2 - 7/4/11 [LIST] [*]plugin console output fixed [*]console output width changed for when running windows [*]plugin help override can be disabled (default) [LIST] [*]plugin help registering is ignored if the command exists already [*]alternatively, can be disabled completely [/LIST] [*]saving of registered commands can be disabled (also, now saves to file, not "_orig" files) [*]ExtraHelp now uses filename as plugin name (plugin field no longer used) [*]added formatting options: [LIST] [*]shortenEntries : can show in old, one-line style [*]chat line (useWordWrap:false) - minecraft chat wraps to next line [*]columns (useWordWrap:true) - command on left, description in word wrap line(s) [LIST] [*]can be right-aligned (wordWrapRight:true) [/LIST] [/LIST] [*]plugin entries can be set to not sorted (listed in the order found in the help file) [*]"/help reload" is now op-only [*]"ExtraHelp.yml" will now be converted (again.. seems to have been removed somewhere..) [*]ExtraHelp supports a multi-directory structure (like FabiaN's help package) (plugin name will be the directory name) [*]improved node error messages when loading [*]fixed permissions 3x illegalAccessErrors on load (and api errors) [/LIST] Version 0.2.4.1 - 4/4/11 [LIST] [*]another illegalAccessError (hopefully) resolved [/LIST] Version 0.2.4 - 4/2/11 [LIST] [*]updated an illegalAccess error that was occurring in 617 [/LIST] Version 0.2.3 - 3/25/11 [LIST] [*]fixed a null pointer exception in plugin help [/LIST] Version 0.2.2 - 3/24/11 [LIST] [*]various null pointer fixes (could have nullpointerException on load without) [*]improved help listing [*]added console help support [/LIST] [SIZE=5][FONT=helvetica]Before i started maintaining: [/FONT][/SIZE] [I][SIZE=12px][SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-2.zip'][COLOR=rgb(16, 97, 179)][COLOR=rgb(16, 97, 179)]Help v0.2 [531][/COLOR][/COLOR][/URL][/B][/FONT][/SIZE][/SIZE][/I] [I][SIZE=12px][I]Released 15 Mar, 2011[/I][/SIZE][/I] [I][SIZE=12px]- Built with latest recommend build (531)[/SIZE][/I] [I][SIZE=12px]- Multiline support. Descriptions of commands can now be as long as you'd like.[/SIZE][/I] [I][SIZE=12px]- Separated ExtraHelp.yml into separate YML files (for each plugin, etc).[/SIZE][/I] [I][SIZE=12px]- Plugin overriding. Don't like how a plugin has their Help support? Completely customize their entries.[/SIZE][/I] [I][SIZE=12px][SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-1-1.zip'][COLOR=rgb(16, 97, 179)]Help v0.1.1 [493][/COLOR][/URL][/B][/FONT][/SIZE][/SIZE][/I] [I][SIZE=12px][I]Released 6 Mar, 2011[/I][/SIZE][/I] [I][SIZE=12px]- Built with latest recommend build (493)[/SIZE][/I] [I][SIZE=12px]- Updated for GroupManager 1.0[/SIZE][/I] [I][SIZE=12px][SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-1.zip'][COLOR=rgb(16, 97, 179)][COLOR=rgb(16, 97, 179)]Help v0.1 [440][/COLOR][/COLOR][/URL][/B][/FONT][/SIZE][/SIZE][/I] [I][SIZE=12px][I]Released 28 Feb, 2011[/I][/SIZE][/I] [I][SIZE=12px]- Intial Release[/SIZE][/I] [\spoiler]/
     
  2. Offline

    fread2281

    We also need support for dinnerperms(bukkit perms API)
     
  3. Offline

    user_2408

    Love the fact is still going. By far the most useful help plugin out there!

    I'd love to see the ability to add 'pages' -- discrete help topics that aren't necessarily per-command concepts; more written text. Although I know there are numerous plugins that can do that type of wall-o-text easier, they don't provide a unified user experience under the same command -- or they flat out aren't very good plugins (which is why I love using Help 3 -- it works very well, and the permissions support is functional). There would probably need to be an "override: dont_justify_text" option added to make it stand out a bit easier. I've looked at other plugins along the lines of tutorials, etc, but they either are too poorly programmed, or lack permissions support.

    Example wise, anything from workflow explanations (like using region commands), to new user welcome messages could be added as Page nodes. Anywho, just a suggestion! Thanks for all the hardwork.
     
  4. Offline

    Zone

    A spout gui addon would be sweet!
     
  5. Offline

    oxguy3

    I love this plugin and I've used it on my server forever. In fact, I decided to make some of my plugins hook it. :D My plugins GameModePlus v0.1 and CoolStoryBro v0.4.2 (has supported Help since v0.2) both hook Help, if you want to add them to the list. Thanks!
     
  6. Offline

    ledhead900


    I agree there are no other good help plugins this is the only one left that has a decent category and user made help doc plugin. Someone should pick this up and continue the work updating it and fixing some of the bugs.

    Some things I think should be upgraded when/if this ever gets picked up again
    • Superperm/PEX support - would fix all commands showing to everyone.
    • Proper Short Names - Abbreviation support in configs for the help page. (With this we could have a document with a long name such as "ThelongassandDocument" but shorten it down to /help thebigone)
    And to help get this along I shall now announce a couple names that hopefully will see this and might know what to do with it. (for record I have tried other help plugins and the only really updated one crashes servers :\)

    codename_B, bergerkiller, Brettflan, V10lator, jascotty2
     
  7. Offline

    bergerkiller

    ledhead900 Everyone dislikes adding dependencies :)

    I could use it, but it's usually not very useful in my case. For example, most of my commands require HUGE descriptions.
    For example:
    It really needs to be a VERY good API (word-wrap on new lines, table-layout syntaxis, whatnot) before I start using it, or ever will...
     
  8. Offline

    Lathanael

    @ledhead900

    As i have mention several times now. For the time beeing you can use AdminCmd if yu like. It has this built in, supports the files created on the github repo and also supports the newer permission systems.
    I know at least someone will now jump my throat that they want a stand-alone plugin etc....

    I just mentioned it so you guys know there are alternatives!
     
  9. Offline

    ledhead900

    Well if you get time awesome, I just did not want to make it complicated for those who might just update it as it is , but if feel u can go all out go for it it would be much appreciated.
    Thanks but I looked at it and it has lot of bulk, for instance I run standalone motd, I have already 2 different mob control plugins, most of it I don't need I only needed the help and since (Help Plus) < the updated one, crashes servers with a non showing NPE that just makes servers freeze when non ops use /help. I use this one besides I prefer this layout.
     
  10. Offline

    Lathanael

    Why do i keep reading this? You do know that you can completely DEACTIVATE every single aspect of AdminCmd you do not like to have. Even listeners won't be registrated if not needed. But again i won't force anybody to use it, it is just that the same arguments are used over and over again while they are not really true or can be circumvented.

    I hope you do not feel offended by this comment, if so soryy, i did not want to.

    cheers
    Lathanael
     
  11. Offline

    ledhead900

    Thats fine but its just the though of it that annoys me, I rather have plugin that does a dedicated task and that's all its for. Rather then a bunch of plugins that do many of the same thing and balance out what parts of each I like better.

    Does that make things clearer ?

    Edit:
    Now some how this ones stopped listing like the image in the op, I reverted back to my old settings but its still not listing its just throwing them all into to chat as / commands grrrr.
     
  12. Offline

    Celtic Minstrel

    But those deactivated aspects are still there, hidden away.
     
  13. Offline

    Lathanael

    Nope they aren't. They are present in the AdminCmd.jar yes, but not in the Memory of the server, they are simply not loaded or removed if deactivated and afterwards removed from the memory!
     
  14. Offline

    ledhead900

    Well Ill take a look but I just want a custom help document plugin for help only. If your displays help docs in a per named basis like this one does then ill give it a look, if not then I am back on the hunt again.
     
  15. Offline

    Lathanael

    Mostly yes. you can use the files created for this plugin and put em into AdminCmd ;) If you have any question PM me ;)
     
  16. Offline

    Celtic Minstrel

    This seems kinda unlikely; can you prove that the classes aren't loaded if they're not used?
     
  17. Offline

    Lathanael

    PM sent as i feel this does not belong here and i/we have been a little bit off-topic, sorry.
     
  18. Offline

    ledhead900

    I know that hes not fibbing, I know of other plugins that are like this its quite easy to do really, Tho please forgive me for wording mistakes as I am not a coder myself but I just tend to study best practice for the general purpose of the know what is good for me :).

    Anyway this basically works by having it check on start up a bunch of variables related to the plugin, e,g Mobcont,help,bla,da. Then what this does is as you toggle certain bits of in the config the plugin first checks the config for a list names associated to variables it then checks if these are true or false, if false it will not load the associated class and functions that go along with it if true the later it will load the class belonging to it.

    I know that my re wording is not 100% correct but I think that is essentially the principle you do get a little extra overhead during the boot stage as it checks and loads any needed classes but this overhead does not exist once the server has fully loaded, It is quite possible to code like this its something NOTCH should have done from day one to avoid all his issues.

    As it allows the coder to isolate the sections very easily as they are coded in per class modules and usually rely on one single core but function independent of one another. I believe that notches code is exactly the opposite of this method where most module class's rely solely on one or many other classes to function and thus is why small changes can ultimately have a lasting impact on the end result like a chain reaction.


    Again I want to stress is this is just my understanding from what information I have gathered on pure observation I am willing to listen if anyone feels like contesting.
     
  19. Offline

    Celtic Minstrel

    I don't think he's fibbing, just exaggerating out of lack of understanding of various things. He seems to be saying it doesn't even load unused classes, but more likely it loads all the classes and simply doesn't register unused commands and listeners, so that some classes are loaded but never used. Granted, the former is not impossible; Heroes does something like it by having each skill be a separate jar file, as I recall, and I imagine there must be a way to unload a class programmatically (though I don't think the standard library provides a way); however, I highly doubt AdminCmd would have gone so far as to do that last.

    More to the point, it's not that you can disable stuff you don't want that I don't like; it's more that you need to disable stuff you don't want. He's stuffing too much stuff into a single plugin. I'd rather have ten or so separate plugins to do each of the little things his one plugin does.
     
  20. Offline

    ledhead900

    Well that's my reason for being reluctant as well, see I would either go one large plugin that everything and then leave the rest for fun or I can use many light weight ones that do one thing very simply or very complicated, either of which I think when it comes down to it is just personal preference.

    I am usually always on the look out for lighter plugins to do the simple stuff like commands and tp, Right now I'm tempted to install Mcdocs and just use that replace my current motd plugin and run the whole thing thru that killing two birds in one, Then I will replace CommandBook with Nexus or something else that lets me turn listeners off but is just simplistic with only about 5 commands total to do just what I want Tp and do a couple tiny admin things.
     
  21. Offline

    Lathanael

    From my current understanding of the java VM (so i might be wrong but most probably not) the class is in the process of beeing loaded. While this is happening several errors can occure. Some of them relate to dublicate commands existing. If such an error occures the register-process is aborted and the partially loaded class will be caught by the GC(GarbageCollector) and sonn removed from memory. If you have disabled the command the very same happens. So yes i wasn't 100% correct in saying the are not loaded, what i meant was that they are not loaded after the server is started and has run for a minute. Hope that helps a little bit.

    First, it is not he but they!
    And second, there is nothing i can to against that. It is your personal preference and i won't argue against that as it is pointless for bot of us ;) I'd normally aggree with the approach one plugin for one thing but as the MCServer software (thus bukkit) is not programmed with beeing memoryeffective it is sometimes not the best solution. I have seen servers with one big plugin doing a lot of things running much smoother than another one with a load of plugins doing the same as the big one.
    If you guys can run the server fine with them thats perfect.
    I just wanted to show that there is an alternative while this is inactive.
     
  22. Offline

    meiamone

    Please update for the mc 1.2 release! Thanks!
     
  23. Offline

    TNTUP

    Same! I need it :/ Or well wait until bukkit release their RB for 1.2.3
     
  24. Offline

    Celtic Minstrel

    This is obsolete now. Bukkit has a built-in help system.
     
  25. Offline

    Bjourk

    This is better than that because it's permissions-based, which means players won't have to wade through the /help for all the commands they can't used to find what they need.
     
    meiamone likes this.
  26. Offline

    Celtic Minstrel

    Bukkit's help is also permissions-based. It's just unfortunate that many plugins don't (yet) take advantage of that. They need to either specify the command's permission in the plugin.yml (thus causing Bukkit to check the permission before it even executes their command), or register a custom HelpTopicFactory to calculate permissions for their commands.
     
  27. Offline

    Minecraft-Mania

    Could you please updates this plugin for the latest Bukkit version?
     
  28. Offline

    Celtic Minstrel

    ...it's no longer needed. Bukkit has built-in help now.
     
  29. Offline

    Minecraft-Mania

    Is there any examples on how to use it?
     
  30. Offline

    Celtic Minstrel

    You type /help. :p Um. I know there's some example somewhere, but I forget where. I guess I'll go hunt for it or something. It involves the new help.yml file in your server folder.
     
  31. Offline

    connerreinhardt

    Can you please update so this is compatible with 1.2.3-R0.1 Beta Build.
     

Share This Page