aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-10-21 17:28:00 +0200
committernea <nea@nea.moe>2023-10-21 17:28:00 +0200
commite887067b7ecfa9d8e040008cca8d26c194f8c1a5 (patch)
tree8c558ed23edabd7722bf869ce24d5561b6644e44 /src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt
parentbc758d17e2ac5c507117f85bf76b081a05f2baca (diff)
downloadfirmament-e887067b7ecfa9d8e040008cca8d26c194f8c1a5.tar.gz
firmament-e887067b7ecfa9d8e040008cca8d26c194f8c1a5.tar.bz2
firmament-e887067b7ecfa9d8e040008cca8d26c194f8c1a5.zip
Add tab completion to /warp
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt b/src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt
new file mode 100644
index 0000000..0ac0dde
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/events/MaskCommands.kt
@@ -0,0 +1,17 @@
+/*
+ * SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.events
+
+import com.mojang.brigadier.CommandDispatcher
+
+data class MaskCommands(val dispatcher: CommandDispatcher<*>) : FirmamentEvent() {
+ companion object : FirmamentEventBus<MaskCommands>()
+
+ fun mask(name: String) {
+ dispatcher.root.children.removeIf { it.name.equals(name, ignoreCase = true) }
+ }
+}