target
Chooses a group of players or mobs.
mobs.target(LOCAL_PLAYER);
Parameters
- kind: the type of mobs to select:
local player
: select the current player (you)nearest player
: select the player nearest to the world originrandom player
: select a random player in the worldall players
: select all players in the worldall entities
: select all players and mobsmy agent
: select the agent
Example
Teleport all players, animals and monsters to the current player.
mobs.teleportToPlayer(
mobs.target(ALL_ENTITIES),
mobs.target(LOCAL_PLAYER)
);
See Also
Using target selectors is described in the Minecraft wiki.