aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt
index 81d5d07..e4d3cb2 100644
--- a/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt
+++ b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt
@@ -1,9 +1,7 @@
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
@@ -12,8 +10,9 @@ 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)
+ mc.send {
+ mc.setScreen(DulkirConfig().screen)
+ }
return@executes 0
})
}