Selectors

How to use target specific players or groups in commands

What are selectors

A Player Selector (or more commonly called a filter) is a way to tell OpenAudioMc who you want to target for a command. You may want to target a specific player, a group of players, or even all players on the server.

Selecting a player by name

To select a player by their name, simply enter their in-game name (case-sensitive) into the selector. For example, if you wanted to target the player "John", you would enter /openaudiomc play John.

Selecting everyone

To select everyone, simply enter @a into the selector. For example, if you wanted to target everyone, you would enter /openaudiomc play @a.

Selecting a player by WorldGuard region

This requires WorldGuard to be installed and may not work when you run the command manually in servers with a BungeeCord or other proxy. Please try a CommandBlock instead.

To select a player by their WorldGuard region, we need to take the "everyone" selector and add a filter to it. For example, if you wanted to target everyone in the region "myregion", you would enter /openaudiomc play @a[region=myregion].

Selecting a player by server

This command is only available for servers running OpenAudioMc in their BungeeCord or Velocity, and can only be used through chat or the proxy console

To select a player by their server, we need to take the "everyone" selector and add a filter to it. For example, if you wanted to target everyone on the server "lobby", you would enter /openaudiomc play @a[server=lobby].

Selecting a player by radius

To select a player by their radius, we need to take the "everyone" selector and add a filter to it. For example, if you wanted to target everyone within 100 blocks of you, you would enter /openaudiomc play @a[r=100].

Changing the origin location

By default, the origin location is the player that ran the command or the commandblock that ran the command. You can overwrite the origin location by adding a location filter to the selector, and chaining it with the radius to target players within a radius of a location. For example, if you wanted to target everyone within 100 blocks of the location 100, 100, 100, you would enter /openaudiomc play @a[r=100,x=100,y=100,z=100].

Javadoc