Get a player's position by name?

Started by Adam Albu on

Topic category: Help with modding (Java Edition)

Last seen on 13:49, 15. Jan 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get a player's position by name?
Fri, 06/18/2021 - 14:35 (edited)

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
Last seen on 14:30, 2. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why can't you use the…
Wed, 06/30/2021 - 17:34

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.

Last seen on 14:30, 2. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually, you could loop…
Wed, 06/30/2021 - 18:18

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.

Last seen on 14:15, 10. Jun 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@willk55 Woah thanks for…
Tue, 06/07/2022 - 18:43

@willk55 Woah thanks for that, I think they should add the "name to player" feature but thats a nice fix!

Last seen on 13:49, 15. Jan 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Very good solution, thanks.
Mon, 09/26/2022 - 17:46

Very good solution, thanks.

Last seen on 09:11, 23. Mar 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks guy  
Tue, 01/30/2024 - 15:53

Thanks guy

 

Last seen on 09:11, 23. Mar 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
While i can search for the…
Tue, 01/30/2024 - 17:03

While i can search for the player with exact  name to use it in procedure, does this also work for dead players?