2020-04-15 14:22:03 +02:00
|
|
|
package com.minelittlepony.unicopia.command;
|
|
|
|
|
2020-06-26 11:44:47 +02:00
|
|
|
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
2020-04-15 14:22:03 +02:00
|
|
|
import net.fabricmc.loader.api.FabricLoader;
|
|
|
|
import net.minecraft.server.MinecraftServer;
|
|
|
|
|
|
|
|
public class Commands {
|
|
|
|
public static void bootstrap() {
|
2020-06-26 11:44:47 +02:00
|
|
|
CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> {
|
|
|
|
SpeciesCommand.register(dispatcher);
|
|
|
|
RacelistCommand.register(dispatcher);
|
|
|
|
GravityCommand.register(dispatcher);
|
|
|
|
DisguiseCommand.register(dispatcher);
|
|
|
|
});
|
2020-09-22 15:11:20 +02:00
|
|
|
@SuppressWarnings("deprecation")
|
2020-04-15 14:22:03 +02:00
|
|
|
Object game = FabricLoader.getInstance().getGameInstance();
|
|
|
|
if (game instanceof MinecraftServer) {
|
|
|
|
((MinecraftServer)game).setFlightEnabled(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|