/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  net.minecraft.class_320
 *  net.minecraft.class_4844
 */
package meteordevelopment.meteorclient.systems.accounts.types;

import java.util.Optional;
import meteordevelopment.meteorclient.systems.accounts.Account;
import meteordevelopment.meteorclient.systems.accounts.AccountType;
import net.minecraft.class_320;
import net.minecraft.class_4844;

public class CrackedAccount
extends Account<CrackedAccount> {
    public CrackedAccount(String name) {
        super(AccountType.Cracked, name);
    }

    @Override
    public boolean fetchInfo() {
        this.cache.username = this.name;
        return true;
    }

    @Override
    public boolean login() {
        super.login();
        CrackedAccount.setSession(new class_320(this.name, class_4844.method_43344((String)this.name), "", Optional.empty(), Optional.empty()));
        return true;
    }

    public boolean equals(Object o) {
        if (!(o instanceof CrackedAccount)) {
            return false;
        }
        CrackedAccount account = (CrackedAccount)o;
        return account.getUsername().equals(this.getUsername());
    }
}

