Dynamic Entities (@)
Dynamic entities are a way of referring to a specific entity in the world (a zombie, a player or a cow).
@s | Self
@s refers to ourselves, the player who is typing the command. To test it, we'll do a /give to ourselves
/give @s iron_sword
@p | Nearest Player
With this dynamic entity, the command is only applied to the closest player. We will send a message to the closest player with this command.
/say @p Hi!
@r | Random Player
With this dynamic entity we will kill a random player.
/kill @r
@a | All Players
With this dynamic entity we refer to all players.
/clear @a
@e | All Entities
This is how we refer to all entities (excluding the player)
/kill @e
@e[type=] | Specific Entitie
This is how we refer to a specific entity.
/kill @e[type=cow]
0 Comments