Package net.minecraft.command

Examples of net.minecraft.command.ServerCommandManager


  @EventHandler
  public void serverStart(FMLServerStartingEvent event) {
    MinecraftServer server = MinecraftServer.getServer();
    ICommandManager command = server.getCommandManager();
    ServerCommandManager manager = (ServerCommandManager) command;
        manager.registerCommand(new SetTendencyCommand());
        manager.registerCommand(new MaxResearchCommand());
    manager.registerCommand(new KamiUnlockedCommand());
  }
View Full Code Here


    }

    @Override
    public void registerCommands(Dispatcher dispatcher) {
        if (server == null) return;
        ServerCommandManager mcMan = (ServerCommandManager) server.getCommandManager();

        for (final CommandMapping command : dispatcher.getCommands()) {
            final Description description = command.getDescription();
            mcMan.registerCommand(new CommandBase() {
                @Override
                public String getCommandName() {
                    return command.getPrimaryAlias();
                }
View Full Code Here

    MinecraftServer server = MinecraftServer.getServer(); // Gets current server
    ICommandManager command = server.getCommandManager(); // Gets the command
                                                          // manager to use for
                                                          // server
    ServerCommandManager serverCommand = ((ServerCommandManager) command); // Turns
                                                                           // it
                                                                           // into
                                                                           // another
                                                                           // form
                                                                           // to
                                                                           // use

    serverCommand.registerCommand(new EBXLCommandHandler());
  }
View Full Code Here

        + "\n\nAlso, you really should be making regular backups. (You should be doing that even when not using TT.)");
    Log.info("Server launch took " + ((System.currentTimeMillis() - LaunchClassLoader.launchTime) / 1000f));
    if (Log.debug) {
      Log.debug("TickThreading is running in debug mode.");
    }
    ServerCommandManager serverCommandManager = (ServerCommandManager) event.getServer().getCommandManager();
    serverCommandManager.registerCommand(new TicksCommand());
    serverCommandManager.registerCommand(new TPSCommand());
    serverCommandManager.registerCommand(new ProfileCommand());
    serverCommandManager.registerCommand(new DumpCommand());
    MinecraftServer.setTargetTPS(targetTPS);
    Command.checkForPermissions();
    String javaVersion = System.getProperty("java.runtime.version");
    if (javaVersion.startsWith("1.6")) {
      Log.severe("It is recommended to use a Java 7 JRE. Current version: " + javaVersion);
View Full Code Here

TOP

Related Classes of net.minecraft.command.ServerCommandManager

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.