Search in sources :

Example 1 with ICommandManager

use of net.minecraft.command.ICommandManager 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 ICommandManager

use of net.minecraft.command.ICommandManager 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 3 with ICommandManager

use of net.minecraft.command.ICommandManager 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

EventHandler (cpw.mods.fml.common.Mod.EventHandler)3 ICommandManager (net.minecraft.command.ICommandManager)3 ServerCommandManager (net.minecraft.command.ServerCommandManager)3 IWorkerThread (com.builtbroken.mc.api.process.IWorkerThread)1 WorkerThread (com.builtbroken.mc.lib.world.edit.thread.WorkerThread)1