-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commands
srnyx edited this page May 22, 2026
·
12 revisions
Entity Selectors ↑
"Anything" = player, console, command block, etc...
The default prefix is !, but this may differ by plugin!
| Selector | Type | Targets | Usable By |
|---|---|---|---|
!all_players |
players |
All online AND offline players (anyone that has joined the server) | Anything |
!online |
players |
All online players | Anything |
!offline |
players |
All offline players | Anything |
!self |
player |
Player who ran the command | Player |
!nearest_player * |
player |
Closest player (excluding self) | Player |
!random_player |
player |
A random player on the server | Anything |
!entities |
entities |
All entities (including players) | Anything |
!nearest_entity |
entity |
Closest entity (including players, excluding self) | Player |
!random_entity * |
entity |
A random entity on the server (including players) | Anything |
* If ran by console, it will only consider the primary world of the server. This can be changed to consider all worlds if requested.
| Type | Description |
|---|---|
players |
The command is given a list of multiple players. The command's action is ran for each player. |
player |
The command is given a single player. The command's action is ran for that single player. |
entities |
The command is given a list of multiple entities (players + mobs). The command's action is ran for each entity. |
entity |
The command is given a single entity (player or mob). The command's action is ran for that single entity. |
A plugin's wiki will tell you which types are accepted by each argument. Or, you can just use context to know what is accepted (e.g. you know that a command that sets a player's prefix is not going to work on entities).
