import { world } from "@minecraft/server";
import { fo } from "./utilities/fo_constants";

export function initWorldInitialize() {

    
    if (!world.scoreboard.getObjective("Foreboding")) {
        world.scoreboard.addObjective("Foreboding", "Foreboding");
    };

    if (!world.scoreboard.getObjective("Random")) {
        world.scoreboard.addObjective("Random", "ᛃᚨᛉ");
    };

    if (!world.scoreboard.getObjective("Online")) {
        world.scoreboard.addObjective("Online", " ");
        world.scoreboard.setObjectiveAtDisplaySlot("List", {
            objective: world.scoreboard.getObjective("Online"),
            sortOrder: 0
        })
    };

    
    const forebodingObjective = world.scoreboard.getObjective("Foreboding");
    if (forebodingObjective && forebodingObjective.getParticipants().length === 0) {
        forebodingObjective.addScore("Counter ", 0);
    };

    
    world.scoreboard.getObjective("Online").removeParticipant("Kolveman"); 
    world.scoreboard.getObjective("Online").removeParticipant("Pilot1782"); 

};