aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt
blob: e4d3cb2057bb53f60432f7c1d6e5f74a2a1d5175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.dulkirfabric.commands

import com.dulkirfabric.DulkirModFabric.mc
import com.dulkirfabric.config.DulkirConfig
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.builder.LiteralArgumentBuilder
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
import net.minecraft.command.CommandRegistryAccess

object ConfigCommand {
    fun register(dispatcher: CommandDispatcher<FabricClientCommandSource>, registryAccess: CommandRegistryAccess) {
        dispatcher.register(LiteralArgumentBuilder.literal<FabricClientCommandSource>("dulkir").executes {
            mc.send {
                mc.setScreen(DulkirConfig().screen)
            }
            return@executes 0
        })
    }
}