Java 类net.minecraft.command.ServerCommand 实例源码

项目:DecompiledMinecraft    文件:DedicatedServer.java   
public void executePendingCommands()
{
    while (!this.pendingCommandList.isEmpty())
    {
        ServerCommand servercommand = (ServerCommand)this.pendingCommandList.remove(0);
        this.getCommandManager().executeCommand(servercommand.sender, servercommand.command);
    }
}
项目:Cauldron    文件:DedicatedServer.java   
public void executePendingCommands()
{
    while (!this.pendingCommandList.isEmpty())
    {
        ServerCommand servercommand = (ServerCommand)this.pendingCommandList.remove(0);
        this.getCommandManager().executeCommand(servercommand.sender, servercommand.command);
    }
}
项目:RuneCraftery    文件:DedicatedServer.java   
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);
   }

}
项目:RuneCraftery    文件:DedicatedServer.java   
public void executePendingCommands()
{
    while (!this.pendingCommandList.isEmpty())
    {
        ServerCommand servercommand = (ServerCommand)this.pendingCommandList.remove(0);
        this.getCommandManager().executeCommand(servercommand.sender, servercommand.command);
    }
}
项目:BetterNutritionMod    文件:DedicatedServer.java   
public void executePendingCommands()
{
    while (!this.pendingCommandList.isEmpty())
    {
        ServerCommand servercommand = (ServerCommand)this.pendingCommandList.remove(0);
        this.getCommandManager().executeCommand(servercommand.sender, servercommand.command);
    }
}
项目:DecompiledMinecraft    文件:DedicatedServer.java   
public void addPendingCommand(String input, ICommandSender sender)
{
    this.pendingCommandList.add(new ServerCommand(input, sender));
}
项目:TRHS_Club_Mod_2016    文件:FMLServerHandler.java   
@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();
    }
}
项目:CauldronGit    文件:FMLServerHandler.java   
@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();
    }
}
项目:Cauldron    文件:FMLServerHandler.java   
@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();
    }
}
项目:Cauldron    文件:FMLServerHandler.java   
@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();
    }
}
项目:Cauldron    文件:DedicatedServer.java   
public void addPendingCommand(String p_71331_1_, ICommandSender p_71331_2_)
{
    this.pendingCommandList.add(new ServerCommand(p_71331_1_, p_71331_2_));
}
项目:Cauldron    文件:FMLServerHandler.java   
@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();
    }
}
项目:Cauldron    文件:DedicatedServer.java   
public void addPendingCommand(String p_71331_1_, ICommandSender p_71331_2_)
{
    this.pendingCommandList.add(new ServerCommand(p_71331_1_, p_71331_2_));
}
项目:RuneCraftery    文件:DedicatedServer.java   
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_));
}
项目:RuneCraftery    文件:DedicatedServer.java   
public void addPendingCommand(String par1Str, ICommandSender par2ICommandSender)
{
    this.pendingCommandList.add(new ServerCommand(par1Str, par2ICommandSender));
}
项目:BetterNutritionMod    文件:DedicatedServer.java   
public void addPendingCommand(String par1Str, ICommandSender par2ICommandSender)
{
    this.pendingCommandList.add(new ServerCommand(par1Str, par2ICommandSender));
}