summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2020-04-24 11:55:18 +0800
committerkeuin <[email protected]>2020-04-24 11:55:18 +0800
commitb692a73e039fbdb404ef1219785660dc9eb60e60 (patch)
tree598351d6fcf5f4dcad0212e4cca37ffc16966e0d /src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java
parent87f5cd97ab22b17a948eb9af1b49a0b1e777048d (diff)
Added /kb delete <backup_name> for deleting an backup (with auto-complete supported).
Command /kb confirm now confirms both /kb restore and /kb delete. Added /kb prev for easily check out the latest backup.
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java b/src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java
index 4b4dd59..79029bf 100644
--- a/src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java
+++ b/src/main/java/com/keuin/kbackupfabric/KBCommandRegister.java
@@ -33,5 +33,7 @@ public final class KBCommandRegister {
// register /kb cancel for cancelling the execution to be confirmed. OP is required.
dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("cancel").requires(PermissionValidator::op).executes(KBCommands::cancel)));
+ // register /kb prev for showing the latest backup.
+ dispatcher.register(CommandManager.literal("kb").then(CommandManager.literal("prev").requires(PermissionValidator::op).executes(KBCommands::prev)));
}
}