Skip to content

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 ​

parent: OptionsHelperSince1.8.4read-only#
The options helper that owns this group.

Methods ​

areSubtitlesShown ​

areSubtitlesShown(): booleanSince1.8.4#
Returns whether subtitles are enabled.
Returns: true if subtitles should be shown, false otherwise.

getAmbientVolume ​

getAmbientVolume(): floatSince1.8.4#
Returns: the current ambient volume.

getAudioDevices ​

getAudioDevices(): List<String>Since1.8.4#
Returns available audio device identifiers, including the empty identifier for the default device.
Returns: the available audio device identifiers.

getBlocksVolume ​

getBlocksVolume(): floatSince1.8.4#
Returns: the current volume of block related sounds.

getHostileVolume ​

getHostileVolume(): floatSince1.8.4#
Returns: the current volume of hostile mobs.

getMasterVolume ​

getMasterVolume(): floatSince1.8.4#
Returns: the current master sound volume.

getMusicVolume ​

getMusicVolume(): floatSince1.8.4#
Returns: the current music sound volume.

getNeutralVolume ​

getNeutralVolume(): floatSince1.8.4#
Returns: the current volume of neutral mobs.

getParent ​

getParent(): OptionsHelperSince1.8.4#
Returns: the options helper that owns this group.

getPlayerVolume ​

getPlayerVolume(): floatSince1.8.4#
Returns: the current player volume.

getRecordsVolume ​

getRecordsVolume(): floatSince1.8.4#
Returns: the current records sound volume.

getSoundDevice ​

getSoundDevice(): StringSince1.8.4#
Returns the selected audio device identifier.
Returns: the currently selected sound device.

getVoiceVolume ​

getVoiceVolume(): floatSince1.8.4#
Returns the voice sound volume.
Returns: the current voice volume.

getVolume ​

getVolume(String category): floatSince1.8.4#
Returns the volume for a sound category, looked up by its category name.

Parameters:

  • category: the category to get the volume of
Returns: the volume of the given sound category.

getVolumes ​

getVolumes(): Map<String, Float>Since1.8.4#
Returns the volume of each sound category, keyed by category name.
Returns: a map of all sound categories and their volumes.

getWeatherVolume ​

getWeatherVolume(): floatSince1.8.4#
Returns: the current weather sound volume.

setAmbientVolume ​

setAmbientVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#
Sets the ambient sound volume.

Parameters:

  • volume: the new ambient volume
Returns: self for chaining.

setBlocksVolume ​

setBlocksVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new volume for block sounds
Returns: self for chaining.

setHostileVolume ​

setHostileVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new volume for hostile mobs
Returns: self for chaining.

setMasterVolume ​

setMasterVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new master sound volume
Returns: this helper for chaining.

setMusicVolume ​

setMusicVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new music sound volume
Returns: this helper for chaining.

setNeutralVolume ​

setNeutralVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new volume for neutral mobs
Returns: self for chaining.

setPlayerVolume ​

setPlayerVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new player volume
Returns: self for chaining.

setRecordsVolume ​

setRecordsVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new records sound volume
Returns: this helper for chaining.

setSoundDevice ​

setSoundDevice(String audioDevice): OptionsHelper.MusicOptionsHelperSince1.8.4#
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 ​

setVoiceVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#
Sets the voice sound volume.

Parameters:

  • volume: the new voice volume
Returns: self for chaining.

setVolume ​

setVolume(String category, double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#
Sets the volume for a sound category, looked up by its category name.

Parameters:

  • category: the category to set the volume for
  • volume: the new volume
Returns: self for chaining.

setWeatherVolume ​

setWeatherVolume(double volume): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • volume: the new volume for the weather
Returns: self for chaining.

showSubtitles ​

showSubtitles(boolean val): OptionsHelper.MusicOptionsHelperSince1.8.4#

Parameters:

  • val: whether subtitles should be shown or not
Returns: self for chaining.