summaryrefslogtreewikicommitdiff
path: root/core/src/command/Debug.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/command/Debug.kt')
-rw-r--r--core/src/command/Debug.kt24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/src/command/Debug.kt b/core/src/command/Debug.kt
new file mode 100644
index 0000000..d000d60
--- /dev/null
+++ b/core/src/command/Debug.kt
@@ -0,0 +1,24 @@
+package cat.freya.khs.command
+
+import cat.freya.khs.Khs
+import cat.freya.khs.command.util.Command
+import cat.freya.khs.inv.createDebugMenu
+import cat.freya.khs.player.Player
+import cat.freya.khs.runChecks
+
+class KhsDebug : Command {
+ override val label = "debug"
+ override val usage = listOf<String>()
+ override val description = "Mess with/debug the current game"
+
+ override fun execute(plugin: Khs, player: Player, args: List<String>) {
+ runChecks(plugin, player) { gameMapExists() }
+
+ val inv = createDebugMenu(plugin) ?: return
+ player.showInventory(inv)
+ }
+
+ override fun autoComplete(plugin: Khs, parameter: String, typed: String): List<String> {
+ return listOf()
+ }
+}