How to make a help command with multiple pages

Discussion in 'Plugin Development' started by Rehmedy, Jun 15, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Rehmedy

    Hey, Rehmedy here again. I just learned how to make a help message return from a command, but now I need to know if you can make that into multiple pages using helpMessage (Player);. The command for help would be /chunk and the command for more pages would be /chunk 2, /chunk 3, etc... Thanks
     
  2. There's a string paginator utility available in the Bukkit API: ChatPaginator.paginate(unpaginatedString, pageNumber)
    That method basically splits a string into pages and returns the specified page.
    There are also 2 more optional arguments you can use to be more specific about line size.
     
Thread Status:
Not open for further replies.

Share This Page