package net.miarma.hystuff.common;

import com.hypixel.hytale.math.vector.Vector3d;
import com.hypixel.hytale.math.vector.Vector3f;

import javax.annotation.Nonnull;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public class LastPositionManager {
    private final Map<UUID, Location> lastPositions = new ConcurrentHashMap<>();

    public void set(UUID uuid, Location pos) {
        lastPositions.put(uuid, pos);
    }

    public Location get(UUID uuid) {
        return lastPositions.get(uuid);
    }

    public boolean has(UUID uuid) {
        return lastPositions.containsKey(uuid);
    }

    public void clear(UUID uuid) {
        lastPositions.remove(uuid);
    }
}
