import { world } from '@minecraft/server';
world.afterEvents.entityHitEntity.subscribe(evd => {
    const { damagingEntity, hitEntity } = evd;
    const heldItem = damagingEntity.getComponent('equippable').getEquipment('Mainhand');
    if (heldItem?.typeId === 'ww:feather_wand') {
        hitEntity.addEffect('regeneration', 50 * 5, { amplifier: 3, showParticles: true });
    }
});
