Command doesn't work using target selectors

Started by fl0wy.nx on

Topic category: Help with modding (Java Edition)

Last seen on 15:44, 11. Feb 2024
Joined Jan 2024

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Command doesn't work using target selectors

Hi guys, I've already made a topic like this but I'm making another one to add images.

What I'm trying to achieve is to allow players to teleport to waypoints created with the Xaero's Minimap mod in worlds with cheats disabled or without being OP.
I do this because I often play with waypoints in multiplayer worlds with my friends and to make them use them too I have to make them OP. I would prefer to avoid this because they might go into creative mode or use other commands.

When creating the mod, I set the execution permission level to 0 (this should allow the command to be used even with cheats disabled).
I then tested the mod in a singleplayer world, created a waypoint and the mod worked. When entering a multiplayer world, however, the mod had no effect for my friends because they were using the @s target selector: the command therefore works, in case you are not OP, only if you write your username instead of @s. (command showed in MCreator) (comand procedure showed in MCreator)

Is there a way I can allow players to use the target selector? It would be way easier for me to publish it within my modpack.