diff options
author | Keuin <[email protected]> | 2020-04-24 13:10:00 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2020-04-24 13:10:00 +0800 |
commit | 59674ed29c6b2c7e8ac98fc4f0f4fd4fd6d437c9 (patch) | |
tree | 47730fe93306b41b68f29b86ef5d0860c0d53d42 /src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java | |
parent | 5749fc65909f0ee934d0410406265387157575a1 (diff) |
Implemented uniformed console output (log4j) in PrintUtil.
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java | 20 |
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(); +} |