How to use target specific players or groups in commands
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.
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
.
To select everyone, simply enter @a
into the selector.
For example, if you wanted to target everyone, you would enter /openaudiomc play @a
.
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]
.
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]
.
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]
.
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]
.