@Mod.EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager serverCommand = (ServerCommandManager) command; serverCommand.registerCommand(new CommandAlly()); serverCommand.registerCommand(new CommandAllyAccept()); serverCommand.registerCommand(new CommandAllyList()); serverCommand.registerCommand(new CommandAllyReject()); serverCommand.registerCommand(new CommandAllyRemove()); serverCommand.registerCommand(new CommandEnemy()); serverCommand.registerCommand(new CommandEnemyList()); serverCommand.registerCommand(new CommandEnemyRemove()); }
@EventHandler public void serverStart(FMLServerStartedEvent event) { ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandTModifiers()); if(!jsonFile.exists()) try { jsonFile.createNewFile(); PrintStream out = new PrintStream(new FileOutputStream(jsonFile)); writeDefaultJSON(out); out.close(); } catch (IOException e) { Logger.getLogger(NAME).log(Level.WARNING, "Could not create json file - " + e); } reloadModifiers(); // for(ItemModifier mod : ModifyBuilder.instance.itemModifiers) // System.out.println(mod.getClass()); new Thread(){ public void run(){ ItemUpdate.checkForUpdate(); } }.start(); }
/** * Registers all server commands * * @return Whether the server commands were registered successfully */ private void registerServerCommands(MinecraftServer server) throws Exception { List<Class<? extends StandardCommand>> serverCommands = this.mod.getServerCommandClasses(); if (serverCommands == null) throw new RuntimeException("Server Command Classes not loaded"); ServerCommandManager commandManager = (ServerCommandManager) server.getCommandManager(); for (Class<? extends StandardCommand> cmdClass : serverCommands) { try { StandardCommand cmd = cmdClass.newInstance(); if (cmd instanceof MultipleCommands) { Constructor<? extends StandardCommand> ctr = cmdClass.getConstructor(int.class); for (int i = 0; i < ((MultipleCommands) cmd).getCommandNames().length; i++) if (this.mod.isCommandEnabled(((MultipleCommands) cmd).getCommandNames()[i])) commandManager.registerCommand(new ServerCommand(ServerCommand.upcast(ctr.newInstance(i)))); } else if (this.mod.isCommandEnabled(cmd.getCommandName())) commandManager.registerCommand(new ServerCommand(ServerCommand.upcast(cmd))); } catch (Exception ex) { this.mod.getLogger().warn("Skipping Server Command " + cmdClass.getName() + " due to the following exception during loading", ex); } } }
@EventHandler public void onServerStarting(FMLServerStartingEvent event) { ICommandManager manager = event.getServer().getCommandManager(); if (manager instanceof ServerCommandManager) { ((ServerCommandManager) manager).registerCommand(CommandManager.INSTANCE); } if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { Progression.logger.log(Level.INFO, "How did a client get in the server start?"); return; } //Remap all relevant data, Loads in the server data RemappingHandler.reloadServerData(JSONLoader.getServerTabData(RemappingHandler.getHostName()), false); World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0]; data = (PlayerSavedData) world.loadItemData(PlayerSavedData.class, MODNAME); if (data == null) { createWorldData(); } }
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_) { this.field_152366_X = new PlayerProfileCache(this, field_152367_a); mcServer = this; this.serverProxy = p_i45281_2_; this.anvilFile = p_i45281_1_; this.field_147144_o = new NetworkSystem(this); this.commandManager = new ServerCommandManager(); this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_); this.field_152364_T = new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString()); this.field_147143_S = this.field_152364_T.createMinecraftSessionService(); this.field_152365_W = this.field_152364_T.createProfileRepository(); this.primaryThread = new Thread(this, "Server thread"); // CraftBukkit this.cauldronConfig = new CauldronConfig("cauldron.yml", "cauldron"); this.tileEntityConfig = new TileEntityConfig("tileentities.yml", "cauldron_te"); }
public MinecraftServer(File par1File) { this.serverProxy = Proxy.NO_PROXY; this.field_143008_E = 0; this.sentPacketCountArray = new long[100]; this.sentPacketSizeArray = new long[100]; this.receivedPacketCountArray = new long[100]; this.receivedPacketSizeArray = new long[100]; this.tickTimeArray = new long[100]; this.texturePack = ""; mcServer = this; this.anvilFile = par1File; this.commandManager = new ServerCommandManager(); this.anvilConverterForAnvilFile = new AnvilSaveConverter(par1File); this.registerDispenseBehaviors(); }
@EventHandler public void onServerStarting(FMLServerStartedEvent event){ ServerCommandManager mgr = (ServerCommandManager) MinecraftServer.getServer().getCommandManager(); mgr.registerCommand(new ClaimCommand()); mgr.registerCommand(new DeleteClaim()); mgr.registerCommand(new ModifyACL()); mgr.registerCommand(new ShowClaims()); mgr.registerCommand(new HideClaims()); mgr.registerCommand(new TransferClaim()); mgr.registerCommand(new Execute()); mgr.registerCommand(new AdminInvisibility()); mgr.registerCommand(new AdminMode()); mgr.registerCommand(new TempBan()); mgr.registerCommand(new PermaBan()); mgr.registerCommand(new UnBan()); mgr.registerCommand(new OpenInventory()); mgr.registerCommand(new Warp()); }
/** * Save the instance of the command manager and initialize the commands. * * @param event The server starting event that was fired. */ @EventHandler public void serverStarting(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); HueManager hueManager = HueManager.getInstance(); hueManager.setMinecraftServer(server); this.listener.setWorld(server.getEntityWorld()); this.commandManager = (ServerCommandManager) server.getCommandManager(); this.initCommands(); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { ICommandManager commandManager = MinecraftServer.getServer().getCommandManager(); ServerCommandManager serverCommandManager = ((ServerCommandManager) commandManager); addCommands(serverCommandManager); }
public void addCommands(ServerCommandManager manager) { manager.registerCommand(new CommandResetGame()); manager.registerCommand(new CommandPassword()); manager.registerCommand(new CommandKillme()); manager.registerCommand(new CommandPlaySound()); manager.registerCommand(new CommandStopRounds()); manager.registerCommand(new CommandContinueRound()); manager.registerCommand(new CommandInspect()); manager.registerCommand(new CommandMotD()); manager.registerCommand(new CommandKillAll()); manager.registerCommand(new CommandRobot()); manager.registerCommand(new CommandConfig()); manager.registerCommand(new CommandHotPotato()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = MinecraftServer.getServer(); // Get's the current server instance ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; //manager.registerCommand(new CommandModInfo()); manager.registerCommand(new CommandChangelog()); manager.registerCommand(new CommandAbilities()); }
@Mod.EventHandler public void serverStart(FMLServerStartingEvent e) { MinecraftServer server = getServer(); ICommandManager iCommandManager = server.getCommandManager(); ServerCommandManager serverCommandManager = (ServerCommandManager)iCommandManager; serverCommandManager.registerCommand(new CommandHandler()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { //Thread.currentThread().setName("EpicProportionsMod"); MinecraftServer server = MinecraftServer.getServer(); // Get's the current server instance ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new CommandModInfo()); manager.registerCommand(new CommandChangelog()); }
private void registerCommands(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new CommandWallet()); manager.registerCommand(new CommandBalance()); manager.registerCommand(new CommandPay()); }
@Mod.EventHandler public void serverStarting(FMLServerStartingEvent event){ MinecraftServer server = event.getServer(); ICommandManager cmdmng = server.getCommandManager(); if (cmdmng instanceof ServerCommandManager && cmdmng instanceof CommandHandler) { CommandHandler cmdhnd = (CommandHandler) cmdmng; TaleCraftCommands.register(cmdhnd); } // By calling this method, we create the ServerMirror for the given server. ServerHandler.getServerMirror(server); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer mcserver = event.getServer(); // Register commands ((ServerCommandManager) mcserver.getCommandManager()).registerCommand(new CommandCreateView()); // Start up the packet dispatcher we use for throttled data to client. ServerPacketDispatcher.getInstance().start(); //Note: This might need to be preceded by a force init of the ServerPacketDispatcher. Doesn't seem to currently have any issues, though. }
@EventHandler public void onServerStart(FMLServerStartingEvent evt) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new VintageCraftCommands()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { ICommandManager command = event.getServer().getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new UCCommand()); manager.registerCommand(new UCBalance()); manager.registerCommand(new UCRebalance()); manager.registerCommand(new UCGive()); manager.registerCommand(new UCSend()); }
@Override public String execute(CommandSender sender, String[] params) throws CommandException { if (params.length > 1) { if (params[0].equalsIgnoreCase("enable")) { ICommand enable = this.disabledCommands.get(params[1]); if (enable != null) { ((ServerCommandManager) sender.getServer().getCommandManager()).registerCommand(enable); this.disabledCommands.remove(params[1]); sender.sendLangfileMessage("command.command.enabled"); } else throw new CommandException("command.command.alreadyEnabled", sender); } else if (params[0].equalsIgnoreCase("disable")) { if (params[1].equals(this.getCommandName())) throw new CommandException("command.command.wantedToDisable", sender); ICommand disable = (ICommand) ((ServerCommandManager) sender.getServer().getCommandManager()).getCommands().get(params[1]); if (disable != null) { this.disabledCommands.put(disable.getName(), disable); ((ServerCommandManager) sender.getServer().getCommandManager()).getCommands().remove(params[1]); sender.sendLangfileMessage("command.command.disabled"); } else throw new CommandException("command.command.alreadyDisabled", sender); } else throw new CommandException("command.generic.invalidUsage", sender, this.getCommandName()); } else throw new CommandException("command.generic.invalidUsage", sender, this.getCommandName()); return null; }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { ServerCommandManager manager = (ServerCommandManager) event.getServer().getCommandManager(); manager.registerCommand(new BfsrSpawnCommand()); manager.registerCommand(new BfsrGotoNurseryCommand()); manager.registerCommand(new BfsrRegenTutorialDimension()); manager.registerCommand(new BfsrTeleportCommand()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); ICommandManager command = server.getCommandManager(); ServerCommandManager serverCommand = (ServerCommandManager) command; serverCommand.registerCommand(new CommandKills()); serverCommand.registerCommand(new CommandShowKills()); serverCommand.registerCommand(new CommandSetBase()); serverCommand.registerCommand(new CommandEditMode()); }
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_) { mcServer = this; this.serverProxy = p_i45281_2_; this.anvilFile = p_i45281_1_; this.field_147144_o = new NetworkSystem(this); this.commandManager = new ServerCommandManager(); this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_); this.field_147143_S = (new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString())).createMinecraftSessionService(); }
public BukkitCommandMap(BukkitServer server) { super(server); this.server = server; manager = (ServerCommandManager) server.getVanillaServer().commandManager; for(Object[] args: delayedRegisters) { registerInForge((Boolean)args[0], (String)args[1], (String)args[2], (Command)args[3]); } delayedRegisters = null; }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; StuckCommand stuckCommand = new StuckCommand(); FMLCommonHandler.instance().bus().register(stuckCommand); //listen for ticks manager.registerCommand(stuckCommand); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new HomeTeleportCMD()); manager.registerCommand(new SkillsCMD()); manager.registerCommand(new SuppressExpMessagesCMD()); manager.registerCommand(new Runecraft2Help()); }
@EventHandler public void onServerStart(FMLServerStartingEvent evt) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new ServerCommandsVC()); }
@EventHandler //TODO public void serverStart(FMLServerStartingEvent event) { Log.info("-----SERVER CONTENT LOAD INITATING-----"); Log.info("Loading Commands..."); MinecraftServer server = MinecraftServer.getServer(); ServerCommandManager cmdman = (ServerCommandManager) server.getCommandManager(); cmdman.registerCommand(new CommandZeroQuest()); Log.info("Commands Loaded Successfully!"); Log.info("-----SERVER CONTENT LOAD FINSHED-----"); }
@EventHandler public void onServerStart(FMLServerStartingEvent parEvent) { ServerCommandManager manager = CommandHandler.getCommandManager(); Iterator<CommandBase> iter = CommandHandler.INSTANCE.iterator(); while(iter.hasNext()) { CommandBase command = iter.next(); manager.registerCommand(command); } CommandHandler.lock(); }
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_) { this.field_152366_X = new PlayerProfileCache(this, field_152367_a); mcServer = this; this.serverProxy = p_i45281_2_; this.anvilFile = p_i45281_1_; this.field_147144_o = new NetworkSystem(this); this.commandManager = new ServerCommandManager(); this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_); this.field_152364_T = new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString()); this.field_147143_S = this.field_152364_T.createMinecraftSessionService(); this.field_152365_W = this.field_152364_T.createProfileRepository(); }
/** * Registers the command so you don't have to edit the base file. Is somewhat complex as * the register method isn't static. * @param command The command to register. */ public static void registerModCommand(ICommand command) { //The check here stops an NPE. if (MCData.isServerSide()) { ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(command); } }
/** * Register commands on Server Start * * @param event * "unused" */ @EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; NCCommandHandler commandHandler = new NCCommandHandler(manager); commandHandler.registerCommands(false); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { MinecraftServer server= event.getServer(); ServerCommandManager serverCommandManager = (ServerCommandManager) server.getCommandManager(); serverCommandManager.registerCommand(new CommandNBTEdit()); logger.fine("Server Starting -- Added \"/nbtedit\" command"); }
public MinecraftServer(File p_i1498_1_) { this.field_110456_c = Proxy.NO_PROXY; this.field_143008_E = 0; this.field_71300_f = new long[100]; this.field_71301_g = new long[100]; this.field_71313_h = new long[100]; this.field_71314_i = new long[100]; this.field_71311_j = new long[100]; this.field_71297_P = ""; field_71309_l = this; this.field_71308_o = p_i1498_1_; this.field_71321_q = new ServerCommandManager(); this.field_71310_m = new AnvilSaveConverter(p_i1498_1_); this.func_82355_al(); }
@EventHandler public void onServerStart(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); ServerCommandManager manager = (ServerCommandManager)server.getCommandManager(); manager.registerCommand(new CommandMiniBosses()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { commandManager = (ServerCommandManager) MinecraftServer.getServer().getCommandManager(); commandManager.registerCommand(new BNCNutrition()); }
@EventHandler public void onServerStart(FMLServerStartingEvent event){ ServerCommandManager comManager = (ServerCommandManager)MinecraftServer.getServer().getCommandManager(); comManager.registerCommand(new CommandAIDepth()); comManager.registerCommand(new CommandKillPiece()); comManager.registerCommand(new CommandDraw()); }
@EventHandler public void serverStart(FMLServerStartingEvent event){ MinecraftServer server = event.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager serverCommand = ((ServerCommandManager) command); serverCommand.registerCommand(new CommandRoguelike()); }
@ServerStarting public void onServerStart(FMLServerStartingEvent event) { if (MinecraftServer.getServer().getCommandManager() instanceof ServerCommandManager) { ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandSpawn()); ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandStruc()); ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandFreeze()); ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandHeal()); } }