import * as mc from "@minecraft/server";

export function getScore(objective, player) { try { return mc.world.scoreboard.getObjective(objective).getScore(player.scoreboardIdentity); } catch (error) { return 0; } }
export const overworld = mc.world.getDimension("overworld"), nether = mc.world.getDimension("nether"), theEnd = mc.world.getDimension("the end");
export function tick1(callback) { mc.system.runInterval((data) => { for (const player of mc.world.getPlayers()) { callback(player); } }, 1); }

