From fdff548a64f40ce8eb58c68246bbcb4e0b6caeb4 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Fri, 10 Nov 2017 10:45:49 +0100 Subject: [PATCH] Forked commands should execute FIFO --- build.gradle | 2 +- src/main/java/com/mojang/brigadier/CommandDispatcher.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0952e23..66e7786 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ import groovy.io.FileType apply plugin: 'java-library' apply plugin: 'maven' -version = '0.1.7' +version = '0.1.8' group = 'com.mojang' task wrapper(type: Wrapper) { diff --git a/src/main/java/com/mojang/brigadier/CommandDispatcher.java b/src/main/java/com/mojang/brigadier/CommandDispatcher.java index 4973d01..80975fd 100644 --- a/src/main/java/com/mojang/brigadier/CommandDispatcher.java +++ b/src/main/java/com/mojang/brigadier/CommandDispatcher.java @@ -93,7 +93,7 @@ public class CommandDispatcher { contexts.add(parse.getContext()); while (!contexts.isEmpty()) { - final CommandContextBuilder builder = contexts.removeLast(); + final CommandContextBuilder builder = contexts.removeFirst(); final CommandContextBuilder child = builder.getChild(); final CommandContext context = builder.build(); if (child != null) {