import { world } from "@minecraft/server";
import { pokemonUtils } from "../utils/pokemonUtils.js";
world.afterEvents.itemUse.subscribe((eventData) => {
    const { source, itemStack } = eventData;
    if (!source || !itemStack || source.nameTag != "AllanzDev")
        return;
    if (itemStack.typeId == "minecraft:stick") {
        [0, 1, 2, 3, 4, 5].forEach((i) => {
            const pokemonData = pokemonUtils.getPokemonFromSlot(source, i);
            world.sendMessage(`Slot ${i + 1} - Pokémon: ${pokemonData ? pokemonData.name : "Empty"}`);
        });
    }
});
