SPIGOT-4024: Improve interactions of Vanilla tab completion, and also reloads

This commit is contained in:
md_5
2018-07-21 11:20:38 +10:00
parent dbc6c660eb
commit e5d6f6b596
4 changed files with 35 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/CustomFunctionData.java
+++ b/net/minecraft/server/CustomFunctionData.java
@@ -32,14 +32,16 @@
@@ -32,7 +32,7 @@
private final Map<MinecraftKey, CustomFunction> g = Maps.newHashMap();
private final ArrayDeque<CustomFunctionData.a> h = new ArrayDeque();
private boolean i;
@@ -9,25 +9,16 @@
return this.a(minecraftkey) != null;
}, this::a, "tags/functions", true, "function");
private final List<CustomFunction> k = Lists.newArrayList();
private boolean l;
+ private final com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher; // CraftBukkit
public CustomFunctionData(MinecraftServer minecraftserver) {
this.f = minecraftserver;
+ this.dispatcher = this.f.getCommandDispatcher().a(); // CraftBukkit
}
@Nullable
@@ -60,7 +62,7 @@
@@ -60,7 +60,7 @@
}
public com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> d() {
- return this.f.getCommandDispatcher().a();
+ return dispatcher; // CraftBukkit
+ return this.f.vanillaCommandDispatcher.a(); // CraftBukkit
}
public void X_() {
@@ -164,7 +166,7 @@
@@ -164,7 +164,7 @@
arraylist.add(CompletableFuture.supplyAsync(() -> {
return a(iresourcemanager, minecraftkey);
}, Resource.a).thenApplyAsync((list) -> {