From 59674ed29c6b2c7e8ac98fc4f0f4fd4fd6d437c9 Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 24 Apr 2020 13:10:00 +0800 Subject: Implemented uniformed console output (log4j) in PrintUtil. --- .../operation/AbstractConfirmableOperation.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java (limited to 'src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java') 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 context, String backupName) { + return new RestoreOperation(context, backupName); + } + + public static AbstractConfirmableOperation createDeleteOperation(CommandContext context, String backupName) { + return new DeleteOperation(context, backupName); + } + + public abstract boolean confirm(); + + @Override + public abstract String toString(); +} -- cgit v1.2.3