[Fabric] Allow functions to load some of our cmds

Forcibly reload the server resources after we register commands.
This commit is contained in:
Octavia Togami 2020-06-25 22:11:07 -07:00
parent 320509c733
commit 3225cedc1c
No known key found for this signature in database
GPG Key ID: CC364524D1983C99

View File

@ -70,6 +70,7 @@
import java.io.UncheckedIOException; import java.io.UncheckedIOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Collections;
/** /**
* The Fabric implementation of WorldEdit. * The Fabric implementation of WorldEdit.
@ -194,6 +195,9 @@ private void onStartServer(MinecraftServer minecraftServer) {
config = new FabricConfiguration(this); config = new FabricConfiguration(this);
config.load(); config.load();
WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent()); WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
minecraftServer.reloadResources(
minecraftServer.getDataPackManager().getEnabledNames()
);
} }
private void onStopServer(MinecraftServer minecraftServer) { private void onStopServer(MinecraftServer minecraftServer) {