Skip to content

Commands

srnyx edited this page May 23, 2026 · 12 revisions

Table of contents

Entity Selectors

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 [1]
!online players All online players Anything [1]
!offline players All offline players Anything [1]
!self player Player who ran the command Player
!nearest_player player Closest player (excluding self) Anything with a location [2]
!random_player player A random player on the server Anything [1]
!entities entities All entities (including players) Anything [1]
!nearest_entity entity Closest entity (including players, excluding self) Anything with a location [2]
!random_entity entity A random entity on the server (including players) Anything [1] [3]

[1] Console/terminal, players, entities, command blocks, etc.

[2] Players, entities, command blocks, etc.

[3] 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

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).

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.

Clone this wiki locally