import { world, EquipmentSlot } from "@minecraft/server";
import * as utils from "../utils";

export async function onTick()
{
    try {
        for (const player of world.getPlayers()) {
            const equippable = player.getComponent('equippable');
            if(equippable){
                const chest = equippable.getEquipment(EquipmentSlot.Chest);
                if(chest && chest.typeId == "pu_sg:kimono"){
                    utils.runPlayerCommand(player, "effect @s slow_falling 11 3 true");
                }
            }
        }
    } catch (e) {
    }
};