summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java b/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
index 3376ac9..4154464 100644
--- a/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
+++ b/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
@@ -1,8 +1,7 @@
package com.keuin.kbackupfabric;
-import com.keuin.kbackupfabric.util.backup.suggestion.BackupMethodSuggestionProvider;
-import com.keuin.kbackupfabric.util.backup.suggestion.BackupNameSuggestionProvider;
import com.keuin.kbackupfabric.util.PermissionValidator;
+import com.keuin.kbackupfabric.util.backup.suggestion.BackupNameSuggestionProvider;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import net.minecraft.server.command.CommandManager;
@@ -19,19 +18,12 @@ public final class KBCommandsRegister {
// register /kb list for showing the backup list. OP is required.
dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("list").requires(PermissionValidator::op).executes(KBCommands::list)));
- // register /kb backup zip [name] as a alias
- dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("backup").then(
- CommandManager.literal("zip").then(
- CommandManager.argument("backupName", StringArgumentType.greedyString()).requires(PermissionValidator::op).executes(KBCommands::primitiveBackup)
- ).requires(PermissionValidator::op).executes(KBCommands::primitiveBackupWithDefaultName)))
- );
-
- // register /kb backup incremental [name]
- dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("backup").then(
- CommandManager.literal("incremental").then(
- CommandManager.argument("backupName", StringArgumentType.greedyString()).requires(PermissionValidator::op).executes(KBCommands::incrementalBackup)
- ).requires(PermissionValidator::op).executes(KBCommands::incrementalBackupWithDefaultName)))
- );
+// // register /kb backup incremental [name]
+// dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("backup").then(
+// CommandManager.literal("incremental").then(
+// CommandManager.argument("backupName", StringArgumentType.greedyString()).requires(PermissionValidator::op).executes(KBCommands::incrementalBackup)
+// ).requires(PermissionValidator::op).executes(KBCommands::incrementalBackupWithDefaultName)))
+// );
// register /kb backup [name] for performing backup. OP is required.
dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("backup").then(
@@ -53,7 +45,7 @@ public final class KBCommandsRegister {
// register /kb prev for showing the latest backup.
dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("prev").requires(PermissionValidator::op).executes(KBCommands::prev)));
- // register /kb setMethod for selecting backup method (zip, incremental)
- dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("setMethod").then(CommandManager.argument("backupMethod", StringArgumentType.string()).suggests(BackupMethodSuggestionProvider.getProvider()).requires(PermissionValidator::op).executes(KBCommands::setMethod))));
+// // register /kb setMethod for selecting backup method (zip, incremental)
+// dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("setMethod").then(CommandManager.argument("backupMethod", StringArgumentType.string()).suggests(BackupMethodSuggestionProvider.getProvider()).requires(PermissionValidator::op).executes(KBCommands::setMethod))));
}
}