#Playsound problems

4 messages · Page 1 of 1 (latest)

indigo bridge
#

i cannot for the life of me get this to work. the playsound function wont seem to work, and neither will runcommandsilent, pls help

    const { player, block, player: { mainHandItem } } = event;

    const transformBlocks = [
        { input: 'minecraft:mossy_cobblestone', output: 'minecraft:cobblestone', drop: 'kubejs:terra_moss', handItem: 'forge:shears' }
    ];

    transformBlocks.forEach(transform => {
        if (block.id === transform.input && mainHandItem.hasTag(transform.handItem)) {
            block.popItem(transform.drop);
            block.set(transform.output);
            player.swing();
            event.server.runCommandSilent(`playsound minecraft:block.stone.break player ${player.name} ${block.x} ${block.y} ${block.z} 1 1`);
            event.cancel();
        }
    });
});```
tulip apexBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

arctic laurel
#

its player.username

indigo bridge
#

omg im so dumb, tysmmm