Hi guys. I created this small class that can easily create a menu in chat similar to bukkit's /help command and I decided to share it. You can set the amount of entries to display per page and the color and display name of the menu. You can add an unlimited amount of entries and display a page to the player easily. You can download the code here: https://gist.github.com/Ad237/9236820 An example using this is here: Code:java HelpMenu menu = new HelpMenu(ChatColor.DARK_AQUA + "Commands!", 9, ChatColor.GREEN);for(int x=0; x < 25; x++) {menu.addEntry("Entry: " + x);}menu.showPage(event.getPlayer(), 1); I would appreciate some credit if you do use this however it is not required.
Nothing too fancy, just a quick way to add an organized text menu. Here's the code I used for testing. You'd obviously want to store the menu and save it for later use (to save having to make the menu for each time the command is called) Code: if (args.length == 2 && args[0].equals("help") && MathUtils.isInt(args[1])) { try { HelpMenu hm = new HelpMenu("Help Menu", 5, ChatColor.GREEN); hm.addEntry("§aHere's the rules:"); hm.addEntry("§e1. §7Always follow rule #3."); hm.addEntry("§e2. §7If in doubt, check rule #5"); hm.addEntry("§e3. §7When playing, obey rule #4"); hm.addEntry("§e4. §7Don't break rule #1!"); hm.addEntry("§e5. §7Please listen to rule #2."); hm.showPage(player, Integer.valueOf(args[1])); } catch (Exception ex) { player.sendMessage("§cUnable to show the help menu."); } return; }