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

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

  1. Offline


    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 (#)[/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=''][COLOR=rgb(16, 97, 179)]MyHome[/COLOR][/URL] and [URL=''][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.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 "" 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=''][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][/IMG] [IMG][/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 - 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=''][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=''][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=''][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

    Celtic Minstrel

    Read next time. This is obsolete and no longer needed.
  3. Offline


    Might you point me to where tihs was added/changed?
  4. Offline

    Celtic Minstrel

  5. Offline


    Thats enough yes ;)
  6. Offline


    So Bukkit now has built-in, editable help files that you can customize exactly to your liking? I don't want all of the server commands to be displayed to all of my members... it would be great if it were permissions-based, just like this plugin.
  7. Offline

    Celtic Minstrel

    It is permissions-based, but that requires the plugins to tell it which permissions are required. You should at least not see the vanilla commands if you don't have permission to use them, for example.
  8. Offline


    Which is exactly the problem. There are just to many plugins that do not use the plugin.yml for permissions.
  9. Offline

    Celtic Minstrel

    Well, plugin.yml is only the easiest way to do that. General already supports Bukkit help, without having permissions in the plugin.yml, and I believe there are some changes to the Help API coming that will make what General does even easier.
  10. Offline


    Celtic Minstrel: Is there a way to manually define permissions for those plugins that do not define them themselves?
  11. Offline

    Celtic Minstrel

    No, but you could poke the plugin developers to get them to define the permissions.
  12. Offline


    Somone really needs to update this.
  13. Offline

    Celtic Minstrel

    Not really... it's in Bukkit now.
  14. Offline


    Still, there is no tutorial or information on how to use the help.yml to show the plugin commands. Plus, you all have to do everything manually. :/
  15. Offline

    Celtic Minstrel

    I'm sure there's a tutorial and/or information somewhere... just not sure where...

    deltahat should know... I think...
  16. Offline


    The new help system is mostly "automagic". If the plugin authors did their job and properly attributed the description, usage, and permission fields in their plugin.yml files, the new help will pick it up. If not, well, you will have to do things manually. Using the new help system, server owners can create new topics and amend nearly anything in help.

    The technical documentation for the new help system can be found here:
    It's still rather raw and needs further editing, but you can see where it's going.

    This is correct. Until plugin authors start conforming to best practices there is no way for help to determine if a command should or should not be shown. I'll update help.yml so that plugin command help topic permissions are amendable. At least then server admins can manually assign permissions to help topics when plugin authors refuse to.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
    Bjourk likes this.
  17. Offline



    Is there a way to make pages? At the moment it sorta just pukes everything out at once... which is not very user-friendly at all.
  18. Offline


    I'm not sure I understand what you are talking about. All help topics are automatically paged in the chat window. The server console is not paged.
  19. Offline


    The idea of this plugin is that server administrators don't have to rely on developers who may or may not know about or understand the new Bukkit help system. This plugin sets /help the way a server host wants regardless of whether or not the plugins are up to the standard, saving the host a lot of hassle trying to squeeze an update out of every plugin dev or doing it themselves.
  20. Offline

    Celtic Minstrel

    And with the new help API, you can do exactly the same thing (in help.yml). If I read it correctly, amendments can completely replace the default help topic.

    Thus there's no need for this plugin anymore. In fact, the help API gives you more customization than this plugin does!
  21. Offline


    But if you REALLY want to use another plugin for your help system, you can. The /help command (and thus the entire help system) is implemented as an intrinsic bukkit fallback command, so any plugin that registers itself to hendle the /help command will take priority.
  22. Offline


    It would be great if there was some documentation and discussion of the new help.yml system on the bukkit wiki.
    It's nice that this is going to be a global automagic system, and I'm thankful that people are working on improving bukkit, but at this point it sort of hit out of the blue.

    I'm sure I missed some twitter post, some forum post announcing this, various code commits, whatever.

    I had nicely formatted, menu'ed, help. I could leave out useless junk, that no one but myself and a few ops used, and focus on the important commands that players need to know and use a lot. Now my help looks like complete garbage, and I have no idea how to sort it out from the existing, approximately one paragraph, of documentation. When I type help, I have 29 pages to sort through. I have mcMMO commands interspersed with WorldEdit commands interspersed with Citizens commands, because it's only intelligent enough to sort alphabetically. Even if it's only showing the permitted commands to normal players, my players have access to 159 commands, probably 60%-90% of which most players won't use, and won't be relevant to 99% of new players. The alphabetical ordering makes no sense. They need to scroll through 6 pages of help to find out about the '/woodcutting' command.

    I admit I deal with a lot of young, impatient, possibly ADD players. But no skilled player is going to deal with this the way it is now either. If they're really smart they'll go look up the plugins documentation on the web. The help, won't be the /help command anymore, it'll be the chat channel, with silence, typos, and misinformation in full effect. In my old help the command to add someone to a worldguard region was clearly documented as '/region addmember [region name] [player name]' . Sure, I had to remind them not to use the brackets once in awhile. But now in my new chat based 'lord of the flies' help system it becomes '/regians admimbar regions name playr name', leaving new players frustrated when they typed it in exactly as they were told by my helpful, but dyslexic, players. I may be diminishing my players spelling ability in the example I used, but in a text command system, it doesn't matter if you get all characters wrong, or one character wrong, it's always ALL wrong.

    The help topics I did add to help.yml, work from the console, but don't work when logged in, even as an op. The color codes don't seem to work at all. I have no idea why, because there's simply not enough information out there to tell me why.

    Until this can be improved on, I'd rather just stick with this plugin (Help v3) which worked perfectly. Saying it's obsolete at this point, is like giving me a car without an engine and telling me my bicycle is now obsolete. I realize I'm using a beta version of bukkit, but please don't force what appears to be an alpha help system on me.
  23. Offline


    There is some documentation, but it isn't finished yet.

    As you said yourself, you are using a beta build. The new help system is still in flux and your feedback as an early adopter is invaluable. I've created a new topic to provide feedback on the beta help system. Would you mind reposting your ideas there so we can discuss them further in a more constructive manor?

    I really don't want to foist crap upon you and call it gold. If things aren't working, I need to know how I can make them better.

    Bjourk likes this.
  24. Offline


    Thanks, will do.
  25. Offline


    Could someone please just update this plugin? As a plugin developer I know I most likely will NEVER support the plugin.yml Permissions setup; there's really no need for me to waste any time researching that and maintaining that. Meanwhile, I already hook Help 3 in all my active plugins that have commands.

    Updating Help 3 to the new config format isn't that much work, is it? Most of the methods are the same, you just have to change Configuration to FileConfiguration and change how you save and load the config.
  26. Offline

    Celtic Minstrel

    oxguy3 - Hooking the Help API isn't all that different from hooking this old Help plugin, and at this point the new API gives more options than this plugin. I recommend investigating the help API.
  27. Offline


    I don't know if it already is, but if it isn't, could you please get the plugin on CraftBukkitUpToDate? That would be great!
  28. Offline


    What do i do, did i install it wrong?
    15:13:48 [SEVERE] Could not load 'plugins\Help.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bu
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(
            at org.bukkit.craftbukkit.CraftServer.reload(
            at org.bukkit.Bukkit.reload(
            at org.bukkit.command.defaults.ReloadCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(
            at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.
            at net.minecraft.server.MinecraftServer.b(
            at net.minecraft.server.MinecraftServer.w(
    Caused by: java.lang.NoClassDefFoundError: org/bukkit/util/config/Configuration
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(Unknown Source)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at Source)
            at Source)
            at$000(Unknown Source)
            at$ Source)
            at Method)
            at Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            ... 13 more
    Caused by: java.lang.ClassNotFoundException: org.bukkit.util.config.Configuratio
            at$ Source)
            at Method)
            at Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 34 more

Share This Page