blob: 81d5d0784465fdcd949ec446d20f9eeb17d3419e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.dulkirfabric.commands
import com.dulkirfabric.DulkirModFabric
import com.dulkirfabric.DulkirModFabric.mc
import com.dulkirfabric.config.DulkirConfig
import com.google.common.eventbus.Subscribe
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 {
println("command running")
DulkirModFabric.openScreenDelayed(DulkirConfig().screen)
return@executes 0
})
}
}
|