mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-11-27 04:00:48 +08:00
[Fabric] Allow functions to load some of our cmds
Forcibly reload the server resources after we register commands.
This commit is contained in:
parent
320509c733
commit
3225cedc1c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user