Started by
kackalack
on
Topic category: Help with Minecraft modding (Java Edition)
I can't find out how to make a command that when a player types /COMMAND PLAYERNAME it will run a procedure dependent on the other players entity.
Edited by kackalack on Fri, 10/11/2019 - 09:54
Run procedure as entity procedure block does that. Use @p selector to use the linked entity.
I just can't seem to figure it out, is there an example of a command that targets another player?
/give @p minecraft:structure_block
That does not do what I need it to do. that when player one types /command Player2, it uses the name to find the second player, and run a procedure that changes an nbt value of player 2. I am stuck on getting the procedure of the command to actually run on the entity of player2.
You cannot use the name of another player, even if you use the right string representing that player. Even if the line completely overlaps and would work if you had manually typed it in game, it just won't work in the procedure that way.
It is entirely possible to make a custom command that points to a different entity using a name as a parameter.