@ServerStarting public void serverStarting(FMLServerStartingEvent event) { MinecraftServer server = ModLoader.getMinecraftServerInstance(); ICommandManager commandManager = server.getCommandManager(); ServerCommandManager serverCommandManager = (ServerCommandManager) commandManager; serverCommandManager.registerCommand(new CommanduPerm()); }
@EventHandler public void onServerStart(FMLServerStartingEvent evt) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new ServerCommandsVC()); }
@Mod.EventHandler public void serverStart(FMLServerStartingEvent event) { final MinecraftServer server = event.getServer(); final ICommandManager commandManager = server.getCommandManager(); if (commandManager instanceof ServerCommandManager) { final ServerCommandManager serverCommandManager = (ServerCommandManager) commandManager; serverCommandManager.registerCommand(new CommandGenerateWorld()); } else { FMLLog.warning("Unable to get server command manager. No slash-commands will be available."); } }
@EventHandler public void onServerStarting(FMLServerStartingEvent event) { ICommandManager server = MinecraftServer.getServer().getCommandManager(); ((ServerCommandManager) server).registerCommand(new CommandFlush()); }
private void addCommands(ServerCommandManager manager) { if (debug) { manager.registerCommand(new CommandFruitDebug()); } }