Search in sources :

Example 1 with ServerCommandManager

use of net.minecraft.command.ServerCommandManager in project ICBM-Classic by BuiltBrokenModding.

the class ICBMClassic method serverStarting.

@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    // Setup command
    ICommandManager commandManager = FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager();
    ServerCommandManager serverCommandManager = ((ServerCommandManager) commandManager);
    serverCommandManager.registerCommand(new CommandICBM());
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) ICommandManager(net.minecraft.command.ICommandManager) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 2 with ServerCommandManager

use of net.minecraft.command.ServerCommandManager in project PneumaticCraft by MineMaarten.

the class PneumaticCraft method onServerStart.

@EventHandler
public void onServerStart(FMLServerStartingEvent event) {
    ServerCommandManager comManager = (ServerCommandManager) MinecraftServer.getServer().getCommandManager();
    new PCCommandManager().init(comManager);
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) PCCommandManager(pneumaticCraft.common.commands.PCCommandManager) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 3 with ServerCommandManager

use of net.minecraft.command.ServerCommandManager in project ArsMagica2 by Mithion.

the class AMCore method serverStarting.

@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    ICommandManager commandManager = event.getServer().getCommandManager();
    ServerCommandManager serverCommandManager = ((ServerCommandManager) commandManager);
    serverCommandManager.registerCommand(new SetMagicLevelCommand());
    serverCommandManager.registerCommand(new UnlockAugmentedCastingCommand());
    serverCommandManager.registerCommand(new SetAffinityCommand());
    serverCommandManager.registerCommand(new ShiftAffinityCommand());
    serverCommandManager.registerCommand(new RecoverKeystoneCommand());
    serverCommandManager.registerCommand(new RegisterTeamHostilityCommand());
    serverCommandManager.registerCommand(new FillManaBarCommand());
    serverCommandManager.registerCommand(new ReloadSkillTree());
    serverCommandManager.registerCommand(new GiveSkillPoints());
    serverCommandManager.registerCommand(new TakeSkillPoints());
    serverCommandManager.registerCommand(new ClearKnownSpellParts());
    serverCommandManager.registerCommand(new Explosions());
    serverCommandManager.registerCommand(new DumpNBT());
    serverCommandManager.registerCommand(new Respec());
    serverCommandManager.registerCommand(new UnlockCompendiumEntry());
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) ICommandManager(net.minecraft.command.ICommandManager) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 4 with ServerCommandManager

use of net.minecraft.command.ServerCommandManager in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.

the class ModCommands method registerCommands.

// There's some Strange bug with registering commands in the Mod File (The client loading server classes, and then freaking out). Best to just do them all in
// a separate class
public static void registerCommands(MinecraftServer server) {
    ServerCommandManager manager = (ServerCommandManager) server.getCommandManager();
    manager.registerCommand(new PhysSettingsCommand());
    manager.registerCommand(new AirshipSettingsCommand());
    manager.registerCommand(new AirshipMapCommand());
    manager.registerCommand(new ValkyrienWarfareHelpCommand());
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) PhysSettingsCommand(ValkyrienWarfareBase.Command.PhysSettingsCommand) AirshipSettingsCommand(ValkyrienWarfareBase.Command.AirshipSettingsCommand) AirshipMapCommand(ValkyrienWarfareBase.Command.AirshipMapCommand) ValkyrienWarfareHelpCommand(ValkyrienWarfareBase.Command.ValkyrienWarfareHelpCommand)

Example 5 with ServerCommandManager

use of net.minecraft.command.ServerCommandManager in project Engine by VoltzEngine-Project.

the class Engine method serverStarting.

@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    if (!CommandVE.disableCommands) {
        // Setup command
        ICommandManager commandManager = FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager();
        ServerCommandManager serverCommandManager = ((ServerCommandManager) commandManager);
        //Register commands
        serverCommandManager.registerCommand(CommandVE.INSTANCE);
    }
    for (int i = 0; i < actionProcessorThreads; i++) {
        Thread thread = new WorkerThread("" + i);
        thread.start();
    }
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) IWorkerThread(com.builtbroken.mc.api.process.IWorkerThread) WorkerThread(com.builtbroken.mc.lib.world.edit.thread.WorkerThread) ICommandManager(net.minecraft.command.ICommandManager) IWorkerThread(com.builtbroken.mc.api.process.IWorkerThread) WorkerThread(com.builtbroken.mc.lib.world.edit.thread.WorkerThread) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Aggregations

ServerCommandManager (net.minecraft.command.ServerCommandManager)5 EventHandler (cpw.mods.fml.common.Mod.EventHandler)4 ICommandManager (net.minecraft.command.ICommandManager)3 AirshipMapCommand (ValkyrienWarfareBase.Command.AirshipMapCommand)1 AirshipSettingsCommand (ValkyrienWarfareBase.Command.AirshipSettingsCommand)1 PhysSettingsCommand (ValkyrienWarfareBase.Command.PhysSettingsCommand)1 ValkyrienWarfareHelpCommand (ValkyrienWarfareBase.Command.ValkyrienWarfareHelpCommand)1 IWorkerThread (com.builtbroken.mc.api.process.IWorkerThread)1 WorkerThread (com.builtbroken.mc.lib.world.edit.thread.WorkerThread)1 PCCommandManager (pneumaticCraft.common.commands.PCCommandManager)1