Audio Management
Media aliasing
Using media aliases to simplify audio management.
All media commands require media sources in one way or another, but the sources are often long and hard to remember. For example, a SoundCloud URL can be very long and hard to remember. This has a few problems:
- This makes it a pain to bulk change the source of regions/speakers
- It requires you to look up the source every time you want to use it
- Some features (like TrainCarts) require you to use a sign, which is too small to fit a full URL
To solve this, OpenAudioMc has a feature called aliases. Aliases are short names that can be used to refer to a media source. For example, you can create an alias called myMusic that points to https://soundcloud.com/creide13/a-kings-request-cutscene. You can then use a:myMusic in your commands to refer to the source.
Aliases will also be tab-completed in the commands, so you don't have to remember them.
Creating
The command to create an alias is as follows:
/openaudiomc alias <alias> <source>
For example, to create the alias myMusic that points to https://soundcloud.com/creide13/a-kings-request-cutscene, you would use /openaudiomc alias myMusic https://soundcloud.com/creide13/a-kings-request-cutscene.
You can then use this alias in your commands. For example, to play the song, you would use /openaudiomc play @a a:myMusic.
Overwriting aliases
You can simply re-define an alias using the command again, which will overwrite the previous source. Updated sources won't apply for regions/speakers that are already playing the old source, unless players leave their proximity and re-enter again.
Permissions
openaudiomc.commands.alias
This permission is required to use the /oa alias command
Javadoc for this feature
Generated from the dev branch.
