Package org.bukkit.help

Examples of org.bukkit.help.HelpMap


            final Field knownCommandsField = commandMap.getClass().getDeclaredField("knownCommands");
            knownCommandsField.setAccessible(true);
            knownCommands = (Map<String, Command>) knownCommandsField.get(commandMap);

            // Get the HelpMap for the server
            HelpMap helpMap = server.getHelpMap();

            // Get the helpTopics for the server's HelpMap
            final Field helpTopicsField = helpMap.getClass().getDeclaredField("helpTopics");
            helpTopicsField.setAccessible(true);
            helpTopics = (Map<String, HelpTopic>) helpTopicsField.get(helpMap);

            // The Minecraft Help command doesn't like our added commands,
            // so let's force the server to use Bukkit's version if it's running
View Full Code Here


        } else {
            pageHeight = ChatPaginator.CLOSED_CHAT_PAGE_HEIGHT - 1;
            pageWidth = ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH;
        }

        HelpMap helpMap = Bukkit.getServer().getHelpMap();
        HelpTopic topic = helpMap.getHelpTopic(command);

        if (topic == null) {
            topic = helpMap.getHelpTopic("/" + command);
        }

        if (topic == null) {
            topic = findPossibleMatches(command);
        }
View Full Code Here

 
  private transient Collection<HelpTopic> helps = new ArrayList<HelpTopic>();
 
  public void registerHelp() {
    helps.clear();
    final HelpMap help = Bukkit.getHelpMap();
    final HelpTopic t = new GenericCommandHelpTopic(bukkitCommand);
    help.addTopic(t);
    helps.add(t);
    final HelpTopic aliases = help.getHelpTopic("Aliases");
    if (aliases != null && aliases instanceof IndexHelpTopic) {
      aliases.getFullText(Bukkit.getConsoleSender()); // CraftBukkit has a lazy IndexHelpTopic class (org.bukkit.craftbukkit.help.CustomIndexHelpTopic) - maybe its used for aliases as well
      try {
        final Field topics = IndexHelpTopic.class.getDeclaredField("allTopics");
        topics.setAccessible(true);
View Full Code Here

TOP

Related Classes of org.bukkit.help.HelpMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.