Started by
Adam Albu
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, I'm making a QuickCommands mod and I need to get a player's coordinates by name and I can't use the execute command. I'm using Minecraft version 1.16.5 and Mccreator version 2021.1.
Edited by Adam Albu on Fri, 06/18/2021 - 14:35
Why can't you use the execute command? That's probably the easiest solution. If you really want to do it without the execute command, there's probably some custom code you could use, but I don't know what that would be. I'll try to figure it out and report back here.
Actually, you could loop through all the players and select the one with the name you're looking for like this:
https://drive.google.com/file/d/1-LVannoi9qijZ39mfuJhk50-oD8HZovD/view?…
This works better than using the execute command since you actually get the player in a MCreator block, which would allow you to do more things.
@willk55 Woah thanks for that, I think they should add the "name to player" feature but thats a nice fix!
Very good solution, thanks.
Thanks guy
While i can search for the player with exact name to use it in procedure, does this also work for dead players?