summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java
new file mode 100644
index 0000000..d666a34
--- /dev/null
+++ b/src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java
@@ -0,0 +1,20 @@
+package com.keuin.kbackupfabric.operation;
+
+import com.mojang.brigadier.context.CommandContext;
+import net.minecraft.server.command.ServerCommandSource;
+
+public abstract class AbstractConfirmableOperation {
+
+ public static AbstractConfirmableOperation createRestoreOperation(CommandContext<ServerCommandSource> context, String backupName) {
+ return new RestoreOperation(context, backupName);
+ }
+
+ public static AbstractConfirmableOperation createDeleteOperation(CommandContext<ServerCommandSource> context, String backupName) {
+ return new DeleteOperation(context, backupName);
+ }
+
+ public abstract boolean confirm();
+
+ @Override
+ public abstract String toString();
+}