OptionsHelper.MusicOptionsHelper
com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper
Sound volumes, audio-device selection, and subtitles.
js
const options = Client.getGameOptions();
options.music.getMasterVolume();Nested type declared in OptionsHelper.
Constructors
new OptionsHelper.MusicOptionsHelper
new OptionsHelper.MusicOptionsHelper(OptionsHelper optionsHelper, OptionsHelper OptionsHelper)#Stores the supplied parent reference; settings methods use the enclosing
OptionsHelper instance, which may differ.Parameters:
OptionsHelper: parent helper reference to retain
Fields
parent
The options helper that owns this group.
Methods
areSubtitlesShown
Returns whether subtitles are enabled.
Returns:
true if subtitles should be shown, false otherwise.getAmbientVolume
Returns: the current ambient volume.
getAudioDevices
getBlocksVolume
Returns: the current volume of block related sounds.
getHostileVolume
Returns: the current volume of hostile mobs.
getMasterVolume
Returns: the current master sound volume.
getMusicVolume
Returns: the current music sound volume.
getNeutralVolume
Returns: the current volume of neutral mobs.
getParent
Returns: the options helper that owns this group.
getPlayerVolume
Returns: the current player volume.
getRecordsVolume
Returns: the current records sound volume.
getSoundDevice
getVoiceVolume
Returns the voice sound volume.
Returns: the current voice volume.
getVolume
getVolumes
getWeatherVolume
Returns: the current weather sound volume.
setAmbientVolume
Sets the ambient sound volume.
Parameters:
volume: the new ambient volume
Returns: self for chaining.
setBlocksVolume
Parameters:
volume: the new volume for block sounds
Returns: self for chaining.
setHostileVolume
Parameters:
volume: the new volume for hostile mobs
Returns: self for chaining.
setMasterVolume
Parameters:
volume: the new master sound volume
Returns: this helper for chaining.
setMusicVolume
Parameters:
volume: the new music sound volume
Returns: this helper for chaining.
setNeutralVolume
Parameters:
volume: the new volume for neutral mobs
Returns: self for chaining.
setPlayerVolume
Parameters:
volume: the new player volume
Returns: self for chaining.
setRecordsVolume
Parameters:
volume: the new records sound volume
Returns: this helper for chaining.
setSoundDevice
Selects an audio device and reloads the sound manager. An identifier not present in getAudioDevices() selects the default device.
Parameters:
audioDevice: the audio device to use
Returns: self for chaining.
setVoiceVolume
Sets the voice sound volume.
Parameters:
volume: the new voice volume
Returns: self for chaining.
setVolume
Sets the volume for a sound category, looked up by its category name.
Parameters:
category: the category to set the volume forvolume: the new volume
Returns: self for chaining.
setWeatherVolume
Parameters:
volume: the new volume for the weather
Returns: self for chaining.
showSubtitles
Parameters:
val: whether subtitles should be shown or not
Returns: self for chaining.