summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/operation/AbstractConfirmableOperation.java
blob: d666a348fe46690608ed1110ae28b31dfca5b7d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
}