summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-13 17:47:20 +0800
committerkeuin <[email protected]>2021-01-13 17:47:20 +0800
commite0c6a21fe9bfb01237fd145064f0af309879a9fb (patch)
tree321955f96030213c2bc8c3ec350961a81b60edee /src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
parent2bc659d8f95a97d0514491e48ed9c66828a4e308 (diff)
Incremental backup now works (tested, but not thoroughly)
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java b/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
index 4154464..d9ace66 100644
--- a/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
+++ b/src/main/java/com/keuin/kbackupfabric/KBCommandsRegister.java
@@ -18,18 +18,16 @@ 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 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(
CommandManager.argument("backupName", StringArgumentType.greedyString()).requires(PermissionValidator::op).executes(KBCommands::primitiveBackup)
).requires(PermissionValidator::op).executes(KBCommands::primitiveBackupWithDefaultName)));
+ // register /kb incbak [name] for performing incremental backup. OP is required.
+ dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("incbak").then(
+ CommandManager.argument("backupName", StringArgumentType.greedyString()).requires(PermissionValidator::op).executes(KBCommands::incrementalBackup)
+ ).requires(PermissionValidator::op).executes(KBCommands::incrementalBackupWithDefaultName)));
+
// register /kb restore <name> for performing restore. OP is required.
dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("restore").then(CommandManager.argument("backupName", StringArgumentType.greedyString()).suggests(BackupNameSuggestionProvider.getProvider()).requires(PermissionValidator::op).executes(KBCommands::restore)).executes(KBCommands::list)));