Aliases

How to setup shortcuts and pre-registered sources

OpenAudioMc short aliases

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

To create an alias, use the /openaudiomc alias <alias> <source> command. 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

Default access level: op

Javadoc related to this feature (currently based on the dev branch)