public void executePendingCommands() { while (!this.pendingCommandList.isEmpty()) { ServerCommand servercommand = (ServerCommand)this.pendingCommandList.remove(0); this.getCommandManager().executeCommand(servercommand.sender, servercommand.command); } }
public void func_71333_ah() { while(!this.field_71341_l.isEmpty()) { ServerCommand var1 = (ServerCommand)this.field_71341_l.remove(0); this.func_71187_D().func_71556_a(var1.field_73701_b, var1.field_73702_a); } }
public void addPendingCommand(String input, ICommandSender sender) { this.pendingCommandList.add(new ServerCommand(input, sender)); }
@Override public void queryUser(StartupQuery query) throws InterruptedException { if (query.getResult() == null) { FMLLog.warning("%s", query.getText()); query.finish(); } else { String text = query.getText() + "\n\nRun the command /fml confirm or or /fml cancel to proceed." + "\nAlternatively start the server with -Dfml.queryResult=confirm or -Dfml.queryResult=cancel to preselect the answer."; FMLLog.warning("%s", text); if (!query.isSynchronous()) return; // no-op until mc does commands in another thread (if ever) boolean done = false; while (!done && server.func_71278_l()) { if (Thread.interrupted()) throw new InterruptedException(); DedicatedServer dedServer = (DedicatedServer) server; // rudimentary command processing, check for fml confirm/cancel and stop commands synchronized (dedServer.field_71341_l) { for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.field_71341_l, ServerCommand.class).iterator(); it.hasNext(); ) { String cmd = it.next().field_73702_a.trim().toLowerCase(); if (cmd.equals("/fml confirm")) { FMLLog.info("confirmed"); query.setResult(true); done = true; it.remove(); } else if (cmd.equals("/fml cancel")) { FMLLog.info("cancelled"); query.setResult(false); done = true; it.remove(); } else if (cmd.equals("/stop")) { StartupQuery.abort(); } } } Thread.sleep(10L); } query.finish(); } }
@Override public void queryUser(StartupQuery query) throws InterruptedException { if (query.getResult() == null) { FMLLog.warning("%s", query.getText()); query.finish(); } else { String text = query.getText() + "\n\nRun the command /fml confirm or or /fml cancel to proceed." + "\nAlternatively start the server with -Dfml.queryResult=confirm or -Dfml.queryResult=cancel to preselect the answer."; FMLLog.warning("%s", text); if (!query.isSynchronous()) return; // no-op until mc does commands in another thread (if ever) boolean done = false; while (!done && server.isServerRunning()) { if (Thread.interrupted()) throw new InterruptedException(); DedicatedServer dedServer = (DedicatedServer) server; // rudimentary command processing, check for fml confirm/cancel and stop commands synchronized (dedServer.pendingCommandList) { for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext(); ) { String cmd = it.next().command.trim().toLowerCase(); if (cmd.equals("/fml confirm")) { FMLLog.info("confirmed"); query.setResult(true); done = true; it.remove(); } else if (cmd.equals("/fml cancel")) { FMLLog.info("cancelled"); query.setResult(false); done = true; it.remove(); } else if (cmd.equals("/stop")) { StartupQuery.abort(); } } } Thread.sleep(10L); } query.finish(); } }
public void addPendingCommand(String p_71331_1_, ICommandSender p_71331_2_) { this.pendingCommandList.add(new ServerCommand(p_71331_1_, p_71331_2_)); }
public void func_71331_a(String p_71331_1_, ICommandSender p_71331_2_) { this.field_71341_l.add(new ServerCommand(p_71331_1_, p_71331_2_)); }
public void addPendingCommand(String par1Str, ICommandSender par2ICommandSender) { this.pendingCommandList.add(new ServerCommand(par1Str, par2ICommandSender)); }