mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
SPIGOT-5884: Tab completions lost on reloadData / minecraft:reload
This commit is contained in:
parent
fb4e54ad7b
commit
92cbf65649
@ -643,7 +643,7 @@
|
||||
}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
@@ -1217,11 +1472,11 @@
|
||||
@@ -1217,16 +1472,17 @@
|
||||
|
||||
public CompletableFuture<Void> a(Collection<String> collection) {
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
@ -657,7 +657,13 @@
|
||||
}, this).thenCompose((immutablelist) -> {
|
||||
return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this);
|
||||
}).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 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
private void syncCommands() {
|
||||
public void syncCommands() {
|
||||
// Clear existing commands
|
||||
CommandDispatcher dispatcher = console.dataPackResources.commandDispatcher = new CommandDispatcher();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user