13
0
geforkt von Mirrors/Paper

SPIGOT-5884: Tab completions lost on reloadData / minecraft:reload

Dieser Commit ist enthalten in:
md_5 2020-06-30 10:51:26 +10:00
Ursprung fb4e54ad7b
Commit 92cbf65649
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: E8E901AC7C617C11
2 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -643,7 +643,7 @@
} }
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
@@ -1217,11 +1472,11 @@ @@ -1217,16 +1472,17 @@
public CompletableFuture<Void> a(Collection<String> collection) { public CompletableFuture<Void> a(Collection<String> collection) {
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> { CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
@ -657,7 +657,13 @@
}, this).thenCompose((immutablelist) -> { }, this).thenCompose((immutablelist) -> {
return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this);
}).thenAcceptAsync((datapackresources) -> { }).thenAcceptAsync((datapackresources) -> {
@@ -1592,6 +1847,22 @@ this.dataPackResources.close();
this.dataPackResources = datapackresources;
+ this.server.syncCommands(); // SPIGOT-5884: Lost on reload
this.resourcePackRepository.a(collection);
this.saveData.a(a(this.resourcePackRepository));
datapackresources.i();
@@ -1592,6 +1848,22 @@
} }

Datei anzeigen

@ -429,7 +429,7 @@ public final class CraftServer implements Server {
} }
} }
private void syncCommands() { public void syncCommands() {
// Clear existing commands // Clear existing commands
CommandDispatcher dispatcher = console.dataPackResources.commandDispatcher = new CommandDispatcher(); CommandDispatcher dispatcher = console.dataPackResources.commandDispatcher = new CommandDispatcher();