Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int execute(CommandFunction commandFunction, CommandSourceStack commandSourceStack) {
- int n = this.getCommandLimit();
- if (this.isInFunction) {
- if (this.commandQueue.size() + this.nestedCalls.size() < n) {
- this.nestedCalls.add(new QueuedCommand(this, commandSourceStack, new CommandFunction.FunctionEntry(commandFunction)));
- }
- return 0;
- }
- try {
- int n2;
- this.isInFunction = true;
- int n3 = 0;
- CommandFunction.Entry[] arrentry = commandFunction.getEntries();
- for (n2 = arrentry.length - 1; n2 >= 0; --n2) {
- this.commandQueue.push(new QueuedCommand(this, commandSourceStack, arrentry[n2]));
- }
- while (!this.commandQueue.isEmpty()) {
- try {
- QueuedCommand queuedCommand = this.commandQueue.removeFirst();
- this.server.getProfiler().push(queuedCommand::toString);
- queuedCommand.execute(this.commandQueue, n);
- if (!this.nestedCalls.isEmpty()) {
- Lists.reverse(this.nestedCalls).forEach(this.commandQueue::addFirst);
- this.nestedCalls.clear();
- }
- }
- finally {
- this.server.getProfiler().pop();
- }
- if (++n3 < n) continue;
- int n4 = n3;
- return n4;
- }
- n2 = n3;
- return n2;
- }
- finally {
- this.commandQueue.clear();
- this.nestedCalls.clear();
- this.isInFunction = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement