import * as utils from "../utils/index";
import { HEART_DATA } from "../shared/heart_data";
utils.afterEvents.scriptEventRecieve.subscribe("ldz:clear_all_hearts", event => {
    var _a;
    const player = (_a = event.sourceEntity) === null || _a === void 0 ? void 0 : _a.getPlayer();
    if (!player)
        return;
    for (let index = 1; index < HEART_DATA.length; index++) {
        const heart = HEART_DATA[index];
        player.runCommand(`clear @s ${heart.itemName}`);
    }
});
