[INACTIVE][INFO] Help 0.2: The smart /help menu [531]

Discussion in 'Inactive/Unsupported Plugins' started by tkelly, Feb 28, 2011.

  1. Offline

    tkelly

    Help v0.2
    Download Help v0.2
    Download Help (Static Jar)
    Help Source Code
    Suggest Features

    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. [FONT=helvetica][SIZE=5][B]Plugin Support[/B][/SIZE][/FONT] 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][FONT=helvetica][B]Custom ExtraHelp/[/B][/FONT][/SIZE] In the Help.zip download, I include a Help/ folder with a sample extra helps inside the ExtraHelp folder. This shows you how you can add custom commands to the /help menu. I'll also cover how to do that 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 [U][I][B]need[/B][/I][/U] 3 things: command, description, and plugin. These should be self-explanatory. The two optional pieces are "main" and "permissions". 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] 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']MyHome[/URL] and [URL='https://github.com/tkelly910/BigBrother/blob/master/src/main/java/me/taylorkelly/bigbrother/BBHelp.java']BigBrother[/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); [/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] [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+ [FONT=helvetica][SIZE=5][B]ExtraHelp Packs[/B][/SIZE][/FONT] [URL='https://github.com/FabianN/MC-Bukkit-HelpExtra']FabianN put together a repository of entries for your ExtraHelp/ that represent other plugins' commands.[/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] [SPOILER="Changelog"] [SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-2.zip'][COLOR=rgb(16, 97, 179)]Help v0.2 [531][/COLOR][/URL][/B][/FONT][/SIZE] [I]Released 15 Mar, 2011[/I] - Built with latest recommend build (531) - Multiline support. Descriptions of commands can now be as long as you'd like. - Separated ExtraHelp.yml into separate YML files (for each plugin, etc). - Plugin overriding. Don't like how a plugin has their Help support? Completely customize their entries. [SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-1-1.zip']Help v0.1.1 [493][/URL][/B][/FONT][/SIZE] [I]Released 6 Mar, 2011[/I] - Built with latest recommend build (493) - Updated for GroupManager 1.0 [SIZE=5][FONT=helvetica][B][URL='http://taylorkelly.me/plugins/Help/Help%20v0-1.zip'][COLOR=rgb(16, 97, 179)]Help v0.1 [440][/COLOR][/URL][/B][/FONT][/SIZE] [I]Released 28 Feb, 2011[/I] - Intial Release [/SPOILER]/
     
  2. Offline

    Celtic Minstrel

    Post your GroupManager version?
     
  3. Offline

    Metalcat

    Here's my ExtraHelp entries for Essentials, EssentialsSpawn, TPack, Magic Carpet, iConomy, iConomyChestShop, nSpleef and MoveCraft. Feel free to copy and paste them to your ExtraHelp.yml [​IMG] (And also edit them if you want)
    Essentials:
    Code:
    who:
        command: who
        description: Show who's on the server
        plugin: Essentials
        main: true
        permissions: essentials.list
    depth:
        command: depth
        description: Shows how deep down you are
        plugin: Essentials
        main: false
        permissions: essentials.depth
    getpos:
        command: getpos
        description: Displays your current position
        plugin: Essentials
        main: false
        permissions: essentials.getpos
    compass:
        command: compass
        description: Displays your current bearing in the world
        plugin: Essentials
        main: false
        permissions: essentials.compass
    top:
        command: top
        description: Teleports you to the highest block
        plugin: Essentials
        main: false
        permissions: essentials.top
    jump:
        command: jump
        description: You jump to the block you're looking at
        plugin: Essentials
        main: true
        permissions: essentials.jump
    back:
        command: back
        description: Teleports you back after using a teleport command
        plugin: Essentials
        main: false
        permissions: essentials.back
    world:
        command: world [worldname]
        description: Teleports you to [worldname]
        plugin: Essentials
        main: false
        permissions: essentials.world
    msg:
        command: msg [player][message]
        description: Sends a message to [player]
        plugin: Essentials
        main: true
        permissions: essentials.msg
    afk:
        command: afk [message]
        description: Shows you as afk
        plugin: Essentials
        main: true
        permissions: essentials.afk
    rules:
        command: rules [page]
        description: Displays the rules on the server
        plugin: Essentials
        main: true
        permissions: essentials.rules
    motd:
        command: motd
        description: Displays the message of the day
        plugin: Essentials
        main: true
        permissions: essentials.motd
    me:
        command: me [emote message]
        description: Allows you to emote
        plugin: Essentials
        main: false
        permissions: essentials.me
    mail:
        command: mail [player][message]
        description: Send and read mails or clear your inbox
        plugin: Essentials
        main: true
        permissions: essentials.mail.send
    helpop:
        command: helpop [message]
        description: Requests help from online gods
        plugin: Essentials
        main: true
        permissions: essentials.helpop
    whois:
        command: whois [nick|playername]
        description: Allows you to see who someone is
        plugin: Essentials
        main: false
        permissions: essentials.whois
    essentials:
        command: essentials
        description: Reloads the Essentials configuration
        plugin: Essentials
        main: false
        permissions: essentials.essentials
    rel:
        command: rel
        description: reloads all plugins
        plugin: Essentials
        main: false
        permissions: essentials.reloadall
    gc:
        command: gc
        description: Displays chunk, memory, and world information
        plugin: Essentials
        main: false
        permissions: essentials.gc
    plugin:
        command: plugin
        description: Allows you to enable, disable, or reload [plugin]
        plugin: Essentials
        main: false
        permissions: essentials.plugin
    spawnmob:
        command: spawnmob [mob]
        description: Spawns [amount][mob]
        plugin: Essentials
        main: false
        permissions: essentials.spawnmob
    clearinventory:
        command: clearinventory [player name]
        description: Clears the inventory
        plugin: Essentials
        main: false
        permissions: essentials.clearinvenory
    broadcast:
        command: broadcast [message]
        description: Broadcasts a message to all players
        plugin: Essentials
        main: false
        permissions: essentials.broadcast
    antioch:
        command: antioch
        description: B00m!
        plugin: Essentials
        main: false
        permissions: essentials.antioch
    kill:
        command: kill [player]
        description: Kills [player]
        plugin: Essentials
        main: false
        permissions: essentials.kill
    nick:
        command: nick [player][nickname|off]
        description: Give [player] the specified nickname or turn it off
        plugin: Essentials
        main: false
        permissions: essentials.nick
    ping:
        command: ping
        description: Pong!
        plugin: Essentials
        main: false
        permissions: essentials.ping
    give:
        command: Give [player][item][amount]
        description: give [player] the specified item
        plugin: Essentials
        main: false
        permissions: essentials.give
    item:
        command: item [item][amount]
        description: Give yourself the specified item
        plugin: Essentials
        main: true
        permissions: essentials.item
    kit:
        command: kit [kit name]
        description: Gives you a kit
        plugin: Essentials
        main: false
        permissions: essentials.kit
    time:
        command: time [day|night]
        description: Changes the time to day/night
        plugin: Essentials
        main: true
        permissions: essentials.time
    tree:
        command: tree [tree|birch|redwood]
        description: Spawns a tree
        plugin: Essentials
        main: false
        permissions: essentials.tree
    bigtree:
        command: bigtree [tree|redwood]
        description: Spawns a big tree
        plugin: Essentials
        main: false
        permissions: essentials.bigtree
    tptoggle:
        command: tptoggle
        description: Toggles the teleport ability
        plugin: Essentials
        main: false
        permissions: essentials.tptoggle
    tpa:
        command: tpa [player]
        description: Asks [player] to teleport to him/her
        plugin: Essentials
        main: false
        permissions: essentials.tpa
    tp:
        command: tp [player]
        description: Teleports you to [player]
        plugin: Essentials
        main: false
        permissions: essentials.tp
    tpo:
        command: tpo [player]
        description: WIll teleport you to [player]
        plugin: Essentials
        main: false
        permissions: essentials.tpo
    tpahere:
        command: tpahere [player]
        description: Asks [player] to teleport to you
        plugin: Essentials
        main: false
        permissions: essentials.tpahere
    tphere:
        command: tphere [player]
        description: Teleports [player] to you
        plugin: Essentials
        main: false
        permissions: essentials.tphere
    tpohere:
        command: tpohere [player]
        description: Ignores tptoggle and teleports [player] to you
        plugin: Essentials
        main: false
        permissions: essentials.tpohere
    tppos:
        command: tppos [cordinates]
        description: Teleports you to [cordinates]
        plugin: Essentials
        main: false
        permissions: essentials.tppos
    home:
        command: home
        description: Teleports you to your home
        plugin: Essentials
        main: true
        permissions: essentials.home
    sethome:
        command: Sethome
        description: Sets your home to your current position
        plugin: Essentials
        main: true
        permissions: essentials.sethome
    warp:
        command: warp [warpname]
        description: Teleport to [warp]
        plugin: Essentials
        main: true
        permissions: essentials.warp
    setwarp:
        command: setwarp [warpname]
        description: Sets a warp to your current position
        plugin: Essentials
        main: false
        permissions: essentials.setwarp
    delwarp:
        command: delwarp [warpname]
        description: Deletes [warpname]
        plugin: Essentials
        main: false
        permissions: essentials.delwarp
    ban:
        command: ban [player]
        description: Bans [player] from the server
        plugin: Essentials
        main: false
        permissions: essentials.ban
    banip:
        command: banip [name|IP]
        description: Bans the [IP] from the server
        plugin: Essentials
        main: false
        permissions: essentials.banip
    mute:
        command: mute [player]
        description: Mutes [player]
        plugin: Essentials
        main: false
        permissions: essentials.mute
    kick:
        command: kick [player]
        description: Kicks [player] from the server
        plugin: Essentials
        main: false
        permissions: essentials.kick
    burn:
        command: burn [player][seconds]
        description: Sets [player] on fire
        plugin: Essentials
        main: false
        permissions: essentials.burn
    ext:
        command: ext [player]
        description: Extinguishes [player]
        plugin: Essentials
        main: false
        permissions: essentials.
    kickall:
        command: kickall [reason]
        description: Kicks all player from the server
        plugin: Essentials
        main: false
        permissions: essentials.kickall
    unban:
        command: unban [player]
        description: Unbans [player]
        plugin: Essentials
        main: false
        permissions: essentials.unban
    unbanip:
        command: unbanip [player|IP]
        description: Unbans [IP]
        plugin: Essentials
        main: false
        permissions: essentials.unbanip
    tjail:
        command: tjail [player][jailname]
        description: Sends [player] to [jailname]
        plugin: Essentials
        main: false
        permissions: essentials.togglejail
    setjail:
        command: setjail [jailname]
        description: Sets a jail at your current position
        plugin: Essentials
        main: false
        permissions: essentials.setjail
    Essentials Spawn:
    Code:
    spawn:
        command: spawn
        description: Teleports you to the spawn
        plugin: EssentialsSpawn
        main: true
        permissions: essentials.spawn
    setspawn:
        command: setspawn [group]
        description: Sets the spawn to your position
        plugin: EssentialsSpawn
        main: false
        permissions: essentials.setspawn
    TPack:
    Code:
    boomstick:
        command: boomstick
        description: Gives your stick incredible power!
        plugin: TPack
        main: true
        permissions: tpack.boomstick
    cuboid:
        command: cuboid
        description: Toggles cuboid mode
        plugin: TPack
        main: true
        permissions: tpack.cuboid
    cfill:
        command: cfill [block]
        description: Fills the selected area with [block]
        plugin: TPack
        main: false
        permissions: tpack.cuboid
    cdel:
        command: cdel
        description: Deletes all blocks in the selected area
        plugin: TPack
        main: false
        permissions: tpack.cuboid
    cselect:
        command: cselect [co 1][co 2]
        description: Selects the given cordinates
        plugin: TPack
        main: false
        permissions: tpack.cuboid
    listcuboid:
        command: listcuboid
        description: Shows the cordinates of the two points
        plugin: TPack
        main: false
        permissions: tpack.cuboid
    time?:
        command: time?
        description: Shows what time it is
        plugin: TPack
        main: false
    .:
        command: .
        description: Spawns a shelter around you
        plugin: TPack
        main: false
        permissions: tpack.snap
    Magic Carpet:
    Code:
    mc:
        command: mc [size]
        description: Spawns a glass carpet under your feet
        plugin: MagicCarpet
        main: true
        permissions: magiccarpet.mc
    iConomy:
    Code:
    moneyhelp:
        command: money help
        description: Shows money commands
        plugin: iConomy
        main: true
        permissions: iConomy.*
    iConomyChestShop:
    Code:
    sell:
        command: sell
        description: Switches to sell mode
        plugin: iConomyChestShop
        main: true
        permission: iConomyChestShop.shop.sell
    buy:
        command: buy
        description: Switches to buy mode
        plugin: iConomyChestShop
        main: true
        permission: iConomyChestShop.shop.sell
    nSpleef:
    Code:
    spleef define:
        command: spleef define [arena]
        description: Defines the selected arena
        plugin: nSpleef
        main: false
        permissions: nSpleef.admin
    spleef game:
        command: spleef creategame [game][arena]
        description: Creates a game
        plugin: nSpleef
        main: false
        permissions: nSpleef.member
    spleef delgame:
        command: spleef deletegame [game]
        description: Deletes [game]
        plugin: nSpleef
        main: false
        permissions: nSpleef.member
    spleef join:
        command: spleef join [game]
        description: Joins [game]
        plugin: nSpleef
        main: false
        permissions: nSpleef.member
    spleef leave:
        command: spleef leave
        description: Leaves the spleef game
        plugin: nSpleef
        main: false
        permissions: nSpleef.member
    spleef list:
        command: spleef list
        description: Lists all arenas and games
        plugin: nSpleef
        main: false
        permissions: nSpleef.member
    MoveCraft:
    Code:
    craft:
        command: <craft>[command]
        description: Takes control over the [craft] you're on
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
    craftrelease:
        command: <craft> release
        description: Releases the controlled craft
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
    craftremote:
        command: <craft> remote
        description: Toggles the remote controller
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
    craftsize:
        command: <craft> size
        description: Shows the size of the craft
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
    crafttypes:
        command: movecraft types
        description: Shows the available crafts
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
    craftlist:
        command: movecraft list
        description: Lists all controlled crafts
        plugin: MoveCraft
        main: false
        permissions: movecraft.*
     
  4. Offline

    kartman314

    Is there anyway to disable a plugin from providing its help information?

    I have General installed, but it is showing commands in /help General I dont use or need and I cant seem to overload/adjust it using ExtraHelp.yml
     
  5. Offline

    FabianN

    Well huh, I thought I had put the link to the guthub page I made with help pages I'm adding/collecting in my last post, but I guess I didn't... That's what happens when I post a 4AM :p

    https://github.com/FabianN/MC-Bukkit-HelpExtra
     
  6. Offline

    Paradox460

    @Taeir I'm helping code it right into the plugin, so as commands get updated, the help files get updated too.

    @tkelly do the registerHelp calls need to be called directly via init, or can they be called outside, i.e. through a helper?

    The way worldedit's structure works is classes are annotated as a command, then registered as commands. Each annotation has data about the command, including descriptions, permissions, etc. The commands are registered through a class that is called on plugin init. If i put the call to register the help methods in the class that is called at init, it should percolate down, right?

    To make it simpler, here is what is called.

    Plugin load -- call -> WorldEdit.java (registers commands) -- call -> HelpHelper (loads commands).
     
  7. Offline

    FabianN

    Question, pulling from the ExtraHelp.yml file, how does the plugin decide what order to list the help commands in?
     
  8. Offline

    tkelly

    Right now, it's alphabetical (in order of command). But this will probably be changed in the future..
     
  9. Offline

    Celtic Minstrel

    @Paradox460 - I heard you were working on Help integration into WorldEdit... will you be using the ExtraHelps posted here as a basis?
     
  10. Offline

    FabianN

    Damn, can't use that to fake multiple lines...

    Well I added this to the suggestions site you suggest to use, but I'll just repeat it here incase any other members have input to this idea.

    How about having the lists sorted by the name? Currently you say they are not used.
    If we can sort via the names and then are able to make entries with no command, just a description then we could fake two-line descriptions. It's not perfect and admins would have to watch out for the two entries being split over multiple pages, but to me that's an adequate method until real multi-line support is added.

    Would that be an easy thing to do?
     
  11. Offline

    Celtic Minstrel

    Personally, I'd rather wait for true multi-line support.
     
  12. Offline

    Gun_Asylem

    just a question
    is it possible to specify the Order that the cmd's show up. i noticed they are alphabetical, but is it possible to put them in a specified order..
     
  13. Offline

    Bjourk

    Would you please add support for Essentials and Group Manager? That's a lot of commands to enter into ExtraHelp.yml manually!
     
  14. Offline

    lazy_architect

    I may just be slow here but can you change this line. Spent like 20min working on the reason Quickbelt extrahelp would only show the last of the three commands. I had done a Copy and paste and the name was the same so help only showed 1 command.
     
  15. Offline

    Celtic Minstrel

    Take that up with the authors of Essentials and GroupManager.
     
  16. Offline

    Taeir

  17. Offline

    Bjourk

    @Taeir
    Thanks for pointing this out.
    @FabianN
    Awesome job so far! I'll attach my ExtraHelp.yml for your archive.
    Included is my work on:
    -AdminChat
    -BackToBody
    -bFlight
    -Cake
    -ColorMe
    -Essentials (broken into groups, but incomplete)
    -FindMe
    -FishPeople
    -FlyRidgeFly!
    -Group Manager
    -iConomy
    -iConomy BankAccount
    -LightVote
    -Lockette
    -MagicCarpet
    -MeasuringTape
    -PrivateWarp
    -QuickBelt
    -TimeShift

    Thanks again! I might borrow some Essentials and GroupManager extras from your page.
     

    Attached Files:

  18. You featured my plugin. :D
     
  19. Offline

    Bjourk

    What does this mean and how can I fix it?
    Code:
    2011-03-14 18:20:19 [SEVERE] [HELP] Error!
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 28653
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
        at org.yaml.snakeyaml.scanner.ScannerImpl.scanPlain(ScannerImpl.java:1569)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchPlain(ScannerImpl.java:860)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:348)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:592)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:132)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at me.taylorkelly.help.HelpLoader.load(HelpLoader.java:26)
        at me.taylorkelly.help.Help.onEnable(Help.java:29)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
        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)
     
  20. Offline

    Celtic Minstrel

    Uh, it actually looks like the file is being interpreted as the wrong encoding or something... :/ You could try putting quotes around any help entries that contain special characters, though.
     
  21. Offline

    Bjourk

    What does YAML consider special characters? Almost every entry has "<" and ">" in it. Are slashes special? Parentheses? Brackets?
     
  22. Just putting quotes around all strings may help.
     
  23. Offline

    Bjourk

    No friggin' way.
    Does anyone know how to find "<reader>" position 28660?
     
  24. It really is the recommended way to do strings anyway.

    I'm pretty sure a file wide regular expression replacement would be fine.
     
  25. Offline

    Bjourk

    Are you suggesting that there's a way to use Find and Replace to add quotations in every paragraph around everything after "command:" or "description:"?
     
  26. Yes that's exactly what I proposed. I also did it for you.
     

    Attached Files:

    Bjourk likes this.
  27. Offline

    tkelly

    Help 0.2
    Release 15 Mar, 2011
    - Built w/ latest recommended build (531)
    - Multiline support! Command descriptions can now be as long as you'd like.
    - ExtraHelp.yml split into many YML files (more info below)
    - Built-in Help overriding (more info below)

    So, what I like about Help is that it was (and still is) an empty slate, that I can form into whatever direction the community was wanting it to go. So with 0.2, I was able to see how you guys were interacting with it, and try to make your lives a little easier.

    ExtraHelp.yml -> ExtraHelp/
    I've noticed that you guys have been really taking advantage of the ExtraHelp.yml. The sharing of files, and creating repositories for them is exactly what I wanted. Hopefully this change'll make it easier for this.

    I've gotten rid of the ExtraHelp.yml and added an ExtraHelp folder. Any .yml files you place in here will be loaded as if they were part of the ExtraHelp.yml. So you can have a separate file for each plugin, or a separate file for the different levels of permissions, whatever you'd like. This'll also help in hunting down the errors in the .yml files ;)

    When you upgrade to 0.2, Help will auto-convert your ExtraHelp.yml into the separate ones (and rename them to be <plugin>.yml), and you can continue on seamlessly. You can feel free to rename them, change them, whatever you'd like.

    Overriding Plugins with Built-In Support
    As more plugins add Help support, you might not like how they add support. Before 0.2, you just had to accept their entries. But now, you can override them. When another plugin registers itself with Help, Help will generate a .yml file for it, called plugin_orig.yml (where "plugin" is the name of the plugin registering).

    You should not change this file. This is never read, and will be overwritten when the plugin starts up again. This just shows you the exact format of the plugin's Help entries.

    What you can do is take this, and pull out the entries, and save them to your own .yml file. Any changes you make will take priority over the plugins.
     
  28. Offline

    Celtic Minstrel

    I'm not entirely sure, but I think anything not a letter, number, hyphen, or underscore is risky.



    tkelly, what about colouring for optional arguments? Oh, and for plugins like WorldEdit that have a huge number of commands it would be useful for the plugin to be able to divide them up into sections.
     
  29. Offline

    Bjourk

    Cool, thanks! Unfortunately it still didn't work.
    Turns out the main issue was that I had entries where I had left "permissions:" blank, which caused an error to occur. With the individual ExtraHelp ymls I was able to narrow down the problems and fix them all except for GroupManager, which I replaced with tyderion's for the win.

    Included are the first 10. I added the "spawn" and "setspawn" entries to Essentials, as they aren't listed under any sub-plugin.

    Here are the rest of my plugins.
    Thanks to everyone who helped troubleshoot!
     
    Last edited by a moderator: May 10, 2016
  30. Yeah, blank values are invalid in YAML. You just need to not include the line if you don't have data.

    I didn't even notice because the file is huge. :p
     
  31. Offline

    Celtic Minstrel

    Uh, I have had blank values in my plugin.yml without problems. :/
     

Share This Page