diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-05 10:02:32 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-05 10:02:32 -0500 |
commit | eb5a87defb71ef174501d4092d7885f39a48bc77 (patch) | |
tree | 197a6894fcfee9146c0b913f97f924638421d0aa /src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt | |
parent | 41832da25f9aa5cb37fee870752e64e5a9057c17 (diff) | |
download | DulkirMod-Fabric-eb5a87defb71ef174501d4092d7885f39a48bc77.tar.gz DulkirMod-Fabric-eb5a87defb71ef174501d4092d7885f39a48bc77.tar.bz2 DulkirMod-Fabric-eb5a87defb71ef174501d4092d7885f39a48bc77.zip |
config screen stuff
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt new file mode 100644 index 0000000..81d5d07 --- /dev/null +++ b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt @@ -0,0 +1,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 + }) + } +}
\ No newline at end of file |