diff options
Diffstat (limited to 'src/main/kotlin/features/macros/HotkeyAction.kt')
-rw-r--r-- | src/main/kotlin/features/macros/HotkeyAction.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/kotlin/features/macros/HotkeyAction.kt b/src/main/kotlin/features/macros/HotkeyAction.kt index 51c1baa..011f797 100644 --- a/src/main/kotlin/features/macros/HotkeyAction.kt +++ b/src/main/kotlin/features/macros/HotkeyAction.kt @@ -1,14 +1,19 @@ package moe.nea.firmament.features.macros +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable import net.minecraft.text.Text import moe.nea.firmament.util.MC -interface HotkeyAction { +@Serializable +sealed interface HotkeyAction { // TODO: execute val label: Text fun execute() } +@Serializable +@SerialName("command") data class CommandAction(val command: String) : HotkeyAction { override val label: Text get() = Text.literal("/$command") |