#Why did my command didn't work?:(

11 messages · Page 1 of 1 (latest)

runic quarry
#
    if(event.item.hasTag('forge:foods/meat/raw')){
        event.server.runCommand(`give ${event.player.name} minecraft:apple 1`)
    }
})```
there are no errors but it do nothing
fierce ledgeBOT
#

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

austere stag
#

just do event.player.give('apple')

runic quarry
#

I found this in latest.log:The space should be separated after the parameter,But found data in the immediate vicinity....ve literal{gangzhengzhiwei} minecraft:apple 1<--[this]

austere stag
#

you could just remove the 1

runic quarry
austere stag
#

i think it should be event.player.username

#

but why not just use .give()?

runic quarry
#

because it's only a text,i will use a different commands.

#

By the way,is there a function to give some effects to players?