aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/command
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-17 03:53:57 +0200
committernea <nea@nea.moe>2023-07-17 03:53:57 +0200
commit86d7516f3f619a0368b36af6dc5cad13babb5cb5 (patch)
tree7f59d4dd2553a0c21834f4818bdf312bb76381ce /src/main/kotlin/dulkirmod/command
parent69db365139428bd0c433ccbb9d31dfded7216572 (diff)
downloadDulkirMod-86d7516f3f619a0368b36af6dc5cad13babb5cb5.tar.gz
DulkirMod-86d7516f3f619a0368b36af6dc5cad13babb5cb5.tar.bz2
DulkirMod-86d7516f3f619a0368b36af6dc5cad13babb5cb5.zip
Add update notificationsupdatenotifs
Diffstat (limited to 'src/main/kotlin/dulkirmod/command')
-rw-r--r--src/main/kotlin/dulkirmod/command/UpdateCommand.kt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/command/UpdateCommand.kt b/src/main/kotlin/dulkirmod/command/UpdateCommand.kt
new file mode 100644
index 0000000..813fcdb
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/command/UpdateCommand.kt
@@ -0,0 +1,23 @@
+package dulkirmod.command
+
+import dulkirmod.features.UpdateNotificationFeature
+import dulkirmod.utils.TextUtils
+import net.minecraft.command.ICommandSender
+
+class UpdateCommand : ClientCommandBase("updatedulkir") {
+ override fun processCommand(sender: ICommandSender?, args: Array<String>) {
+ when (val a = args.singleOrNull()) {
+ "check" -> {
+ UpdateNotificationFeature.checkUpdate(true)
+ }
+
+ null -> {
+ TextUtils.info("Usage: /updatedulkir check")
+ }
+
+ else -> {
+ UpdateNotificationFeature.downloadUpdate(a)
+ }
+ }
+ }
+} \ No newline at end of file