import { EntityComponentTypes, EntityTameableComponent, system, world } from "@minecraft/server";
import { Server } from "../../../libs/Core/index.js";


Server.scriptEventManager.registerEvent('sculk_jaw_rename', (e) => {
    const entity = e.sourceEntity;

    /** @type {EntityTameableComponent} */
    const tameable = entity.getComponent(EntityComponentTypes.Tameable);
    const owner = tameable.tamedToPlayer;

    if (!owner) return;

    entity.nameTag = `§6${owner.name}'s§r Sculk Jaw`;
});