Skip to content

Commands

srnyx edited this page May 23, 2026 · 12 revisions

Table of contents

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 [1] player Closest player (excluding self) Player
!random_player [2] player A random player on the server Anything
!entities entities All entities (including players) Anything
!nearest_entity [1] entity Closest entity (including players, excluding self) Player
!random_entity [2] entity A random entity on the server (including players) Anything

[1] These ignore the player that ran the command, else it would always just run it for themselves.

[2] If ran by console, it will only consider the primary world of the server. This can be changed to consider all worlds if requested.

Types

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 (ex: <selector: players>). 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).

Clone this wiki locally