Package net.minecraft.command

Examples of net.minecraft.command.CommandHandler


    public void initCommands(MinecraftServer server)
    {
        ICommandManager manager = server.getCommandManager();
        if(manager instanceof CommandHandler)
        {
            CommandHandler handler = (CommandHandler)manager;
            handler.registerCommand(new CommandMorph());
        }
    }
View Full Code Here


        Log.info("Register events");
        /* Register command hander */
        ICommandManager cm = server.getCommandManager();

        if(cm instanceof CommandHandler) {
          CommandHandler scm = (CommandHandler)cm;
            scm.registerCommand(new DynmapCommand(this));
            scm.registerCommand(new DmapCommand(this));
            scm.registerCommand(new DmarkerCommand(this));
            scm.registerCommand(new DynmapExpCommand(this));
            Log.info("Register commands");
        }
        /* Submit metrics to mcstats.org */
        initMetrics();

View Full Code Here

 
  /** Teams command register method */
  @EventHandler
  public void registerCommand(FMLServerStartedEvent e)
  {
    CommandHandler handler = ((CommandHandler)FMLCommonHandler.instance().getSidedDelegate().getServer().getCommandManager());
    handler.registerCommand(new CommandTeams());
  }
View Full Code Here

            FMLLog.warning("Command %s tried to register a duplicate permission!", command);
            return;
        }
        permMap.put(command.getCommandName(), node);
        PermissionsManager.registerPermission(node, permLevel);
        CommandHandler ch = (CommandHandler) MinecraftServer.getServer().getCommandManager();
        ch.registerCommand(command);
    }
View Full Code Here

     *
     * @param e
     */
    public static void load()
    {
        CommandHandler ch = (CommandHandler) MinecraftServer.getServer().getCommandManager();
        for (CommandWrapper cmd : list)
        {
            ch.registerCommand(cmd);
        }
    }
View Full Code Here

    }
    stage = Stage.FINISHED;
  }

  public static void serverStarting(MinecraftServer server) {
    CommandHandler commandManager = (CommandHandler) server.getCommandManager();

    for (Module m : loadedModules) {
      ForestryPlugin plugin = m.instance;
      ICommand[] commands = plugin.getConsoleCommands();
      if (commands == null)
        continue;
      for (ICommand command : commands)
        commandManager.registerCommand(command);
    }
  }
View Full Code Here

        return server;
    }

    public void registerServerCommand(ICommand command)
    {
        CommandHandler ch = (CommandHandler) getServer().getCommandManager();
        ch.registerCommand(command);
    }
View Full Code Here

TOP

Related Classes of net.minecraft.command.CommandHandler

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.