- [FEAT] New APIs for Maintenance Mode and rewrite commands system

- [FEAT] Improved config system to fix old loading bugs and support JSON
- [FEAT] LuckPerms support for commands
This commit is contained in:
2024-08-10 15:17:10 +02:00
parent e14ac2a136
commit 614fb0bc49
352 changed files with 6045 additions and 1798 deletions

View File

@@ -9,7 +9,6 @@ import com.hypherionmc.craterlib.core.networking.CraterPacketNetwork;
import com.hypherionmc.craterlib.core.networking.data.PacketSide;
import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
import com.hypherionmc.craterlib.network.CraterFabricNetworkHandler;
import com.hypherionmc.craterlib.nojang.commands.CommandsRegistry;
import com.hypherionmc.craterlib.nojang.server.BridgedMinecraftServer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
@@ -21,8 +20,7 @@ public class CraterLibInitializer implements ModInitializer {
public void onInitialize() {
new CraterPacketNetwork(new CraterFabricNetworkHandler(PacketSide.SERVER));
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> {
CraterEventBus.INSTANCE.postEvent(new CraterRegisterCommandEvent());
CommandsRegistry.INSTANCE.registerCommands(dispatcher);
CraterEventBus.INSTANCE.postEvent(new CraterRegisterCommandEvent(dispatcher));
});