package com.zivilon.cinder_loe.world.event;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public class WarbandTracker {
    public static Map<UUID, WarbandLocationInfo> locations = new HashMap<>();

    public static void clear_locations() {
        locations.clear();
    }

    public static void add(Warband warband) {
        locations.put(warband.warband_uuid, new WarbandLocationInfo(warband, warband.x, warband.z));
    }
    public static void add(WarbandLocationInfo info) {
        locations.put(info.warband.warband_uuid, info);
    }

    public static void remove(UUID uuid) {
        locations.remove(uuid);
    }

    public static List<WarbandLocationInfo> get_all() {
        return new ArrayList<>(locations.values());
    }
}
