"use strict";
import { Player, world } from "@minecraft/server";
world.afterEvents.entityHitEntity.subscribe(event => {
const attacker = event.damagingEntity;
const victim = event.hitEntity;
if (attacker instanceof Player) {
if (victim.typeId == "blossom:ooga_npc") {
attacker.sendMessage("You hit the Ooga NPC!");
}
}
})