Example #1
0
 @ServerStarting
 public void serverStarting(FMLServerStartingEvent event) {
   MinecraftServer server = ModLoader.getMinecraftServerInstance();
   ICommandManager commandManager = server.getCommandManager();
   ServerCommandManager serverCommandManager = (ServerCommandManager) commandManager;
   serverCommandManager.registerCommand(new CommanduPerm());
 }
Example #2
0
 @EventHandler
 public void onServerStart(FMLServerStartingEvent evt) {
   MinecraftServer server = MinecraftServer.getServer();
   ICommandManager command = server.getCommandManager();
   ServerCommandManager manager = (ServerCommandManager) command;
   manager.registerCommand(new ServerCommandsVC());
 }
Example #3
0
 @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());
 }
Example #5
0
 private void addCommands(ServerCommandManager manager) {
   if (debug) {
     manager.registerCommand(new CommandFruitDebug());
   }
 }