Search in sources :

Example 1 with WorkerThread

use of com.builtbroken.mc.lib.world.edit.thread.WorkerThread 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

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