// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.adventure.objectives.transaction;

import javax.annotation.Nonnull;
import com.hypixel.hytale.builtin.adventure.objectives.ObjectivePlugin;
import java.util.UUID;

public class UseEntityTransactionRecord extends TransactionRecord
{
    protected UUID objectiveUUID;
    protected String taskId;
    
    public UseEntityTransactionRecord(final UUID objectiveUUID, final String taskId) {
        this.objectiveUUID = objectiveUUID;
        this.taskId = taskId;
    }
    
    @Override
    public void revert() {
        ObjectivePlugin.get().getObjectiveDataStore().removeEntityTask(this.objectiveUUID, this.taskId);
    }
    
    @Override
    public void complete() {
        ObjectivePlugin.get().getObjectiveDataStore().removeEntityTask(this.objectiveUUID, this.taskId);
    }
    
    @Override
    public void unload() {
        ObjectivePlugin.get().getObjectiveDataStore().removeEntityTask(this.objectiveUUID, this.taskId);
    }
    
    @Override
    public boolean shouldBeSerialized() {
        return false;
    }
    
    @Nonnull
    @Override
    public String toString() {
        return "UseEntityTransactionRecord{objectiveUUID=" + String.valueOf(this.objectiveUUID) + ", taskId='" + this.taskId + "'} " + super.toString();
    }
}
