package com.loganmagnan.eventcore.playerdata;

import com.loganmagnan.eventcore.EventCore;
import com.loganmagnan.eventcore.managers.PlayerDataManager;
import com.loganmagnan.eventcore.playerdata.currentgame.PlayerCurrentGameData;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.ChatColor;
import java.util.UUID;

@Getter
@Setter
public class PlayerData {

    private PlayerDataManager playerDataManager = EventCore.getInstance().getPlayerDataManager();
    private PlayerState playerState = PlayerState.SPAWN;

    private PlayerSettings playerSettings = new PlayerSettings();
    private PlayerCurrentGameData currentGameData = new PlayerCurrentGameData();

    private UUID uniqueId;
    private boolean loaded;

    private ChatColor chatColor;

    public PlayerData(UUID uniqueId) {
        this.uniqueId = uniqueId;
        this.loaded = false;
        this.playerDataManager.loadPlayerData(this);
    }

    public boolean isInSpawn() {
        return this.playerState == PlayerState.SPAWN;
    }
}
