import { world } from "@minecraft/server";
import { playerJoin, playerLeave } from "../C/PlayerList";
import { setupScoreboards } from "../C/scoreboardSetup";
import { loadWardLocations, saveWardLocations } from "../C/Warding";
export function runPlayerJoinEvent(log) {
    world.afterEvents.playerJoin.subscribe((event) => {
        playerJoin(event);
        setupScoreboards();
        if (world.getAllPlayers().length === 0) {
            loadWardLocations();
        }
    });
}
export function runPlayerLeaveAfterEvent(log) {
    world.afterEvents.playerLeave.subscribe((event) => {
        playerLeave(event);
    });
}
export function runPlayerLeaveBeforeEvent(log) {
    world.beforeEvents.playerLeave.subscribe((event) => {
        saveWardLocations();
    });
}

//# sourceMappingURL=../../../../../_KiCuMountsBPDebug/kicu/mmad/ESS/PlayerJoinLeaveEvent.js.map
