import * as utils from "../utils.js";


export async function onEntityHurt(event) {
    const source = event.damageSource.damagingEntity;
    
	if (source && source.typeId == "pu_sg:scorpion") {
		const entity = event.hurtEntity;
		if (entity.isValid()) {
			utils.runEntityCommand(entity, "effect @s poison 3 0");
		}
	}
}