-
Bug
-
Resolution: Awaiting Response
-
None
-
1.21.21
-
None
-
Unconfirmed
await player.runCommandAsync(`clear @s[hasitem={item=bedrock,quantity=64..}] bedrock 0 64`)
Command above works when typed in game yet using it within my behaviour pack it does not? nor does it even return in chat or console.
I'd found similar code from another script as I went digging after I couldn't get my own to work and same issue arises?
Bigger snippet here
form.show(player).then(async r => {
if (r.selection == 0) {
try {
await player.runCommandAsync(`clear @s[hasitem={item=brick_block,quantity=1..}] brick_block 0 1`)
world.sendMessage("Removed 1 brick_block from your inventory")
}
catch (error)
{
world.sendMessage("You have no more brick_block to remove from your inventory")
}