@p and @player don't work in script when using command block
DomAmato opened this issue ยท 7 comments
Using @p or @player as an arg will return @ as the player and the script will fail.
My solution was this:
CityOfLearning@7a5273d#diff-5209bc7547834412393ab984f4735423R193
Please can you provide more of an example what you tried to do and what exactly didn't work?
Can you give me an example script that causes this issue?
And the command used in the command block.
Heres the script
{
"name": "cleardig",
"usage": "/cleardig [player]",
"extraPermissions": {
"fe.commands.cleardig": "OP"
},
"permissionLevel": "TRUE",
"patterns": {
"": [
"echo Usage: /cleardig [player]"
],
"@p": [
"echo clearing dig for player @0",
"$/doas @p //pos1",
"echo set pos1",
"$/doas @p //pos2",
"echo set pos2",
"$/doas @p //expand 13 south",
"echo expand",
"$/doas @p //expand 3 down",
"echo expand",
"$/doas @p //expand 4 up",
"echo expand",
"permset user @p allow worldedit.region.replace",
"echo set pemission for replace",
"$/doas @p //replace dirt air",
"echo replace",
"permset user @p clear worldedit.region.replace",
"echo set permission back",
"$/doas @p //sel",
"echo clear selection"
]
},
"aliases": []
}
and the command block command is pretty straight forward
/cleardig @p
@p should be translated into a uuid or player name by the command block. I will have to step through this. Thanks for the script.