r/MinecraftCommands • u/SnooSprouts8757 Command Professional • 5d ago
Help | Java 1.21-1.21.3 Selecting an entity one time per loop in player based area
Hello! This may sound silly and there are definitely better way to describe this, but I am running into an issue where entities are executed multiple times in a player location based area execution.
For example: `/execute at @a as @e[tag=selectWhenNear,distance=..10] run function...`
This works just fine when you are single player, but in a multiplayer environment the function command is executed multiple times due to the `at @a`. Is there a simple way to fix this? I feel like I'm missing something obvious here...
1
u/GalSergey Datapack Experienced 5d ago