#Job UI Break

1 messages · Page 1 of 1 (latest)

royal chasm
finite tinsel
#

because SoundOptions isn’t defined in this space?

#

you haven’t imported it

#

import { world, SoundOptions } from “@minecraft/server”

finite tinsel
royal chasm
finite tinsel
#
world.events.blockBreak.subscribe(function (event) {
    const player = event.player
    const block = event.brokenBlockPermutation.type

    for (let i = 0; i < t.length; i++) {
        if(block.id == t[i].blockID) {
            player.runCommand(`scoreboard players add @s[tag=job:TreeCutter] ${t[i].xpType} ${t[i].xp}`)
            player.runCommand(`title @s[tag=job:TreeCutter] actionbar  §b${capitalizeFirstLetter(t[i].xpType).slice(0, -2)} : §r${t[i].xp} §aXp`)
            player.playSound("random.orb", {location: player.location, volume: 999, pitch: getRandomFloat(1.6, 2.4, 1)})
        }
        
    }
})
#

try that

finite tinsel
#

aye i’m not here to optimize his code, just trying to make it work

#

wait yeah why are you still using runCommand