Class YamlSoundRepository
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.resources.sound.YamlSoundRepository
- All Implemented Interfaces:
SoundRepository
A class that implements SoundRepository interface
-
Constructor Summary
ConstructorsConstructorDescriptionYamlSoundRepository(org.bukkit.plugin.Plugin plugin, ResourceManager soundResourceManager) Class constructor -
Method Summary
Modifier and TypeMethodDescriptiongetBukkitSoundName(String key) Get bukkit sound name for sound config file keygetKeys()get all keys from the sound configurationbooleanisRegistrySound(String name) booleanTest string is valid bukkit sound namebooleanTest string is valid sound config key in sounds.yml filematchLongest(Enum<?> messageId) voidPlay sound effect for playervoidPlay sound effect for playervoidPlay sound effect for locationboolean
-
Constructor Details
-
YamlSoundRepository
Class constructor
-
-
Method Details
-
getRecord
- Specified by:
getRecordin interfaceSoundRepository
-
getRecord
-
getKeys
Description copied from interface:SoundRepositoryget all keys from the sound configuration- Specified by:
getKeysin interfaceSoundRepository- Returns:
- a Collection of Section of sound configuration keys
-
isValidBukkitSoundName
Description copied from interface:SoundRepositoryTest string is valid bukkit sound name- Specified by:
isValidBukkitSoundNamein interfaceSoundRepository- Parameters:
key- the string to test- Returns:
- true if passed string is contained in the bukkit sounds enum; false if not
-
isRegistrySound
- Specified by:
isRegistrySoundin interfaceSoundRepository
-
isValidSoundConfigKey
Description copied from interface:SoundRepositoryTest string is valid sound config key in sounds.yml file- Specified by:
isValidSoundConfigKeyin interfaceSoundRepository- Parameters:
key- the string to test- Returns:
- true if passed string is a valid key in sounds.yml file; false if not
-
getBukkitSoundName
Get bukkit sound name for sound config file key- Specified by:
getBukkitSoundNamein interfaceSoundRepository- Parameters:
key- sound config file key- Returns:
- Section - the bukkit sound name for key
-
play
Play sound effect for player- Specified by:
playin interfaceSoundRepository- Parameters:
sender- the command sender (player) to play soundsoundId- the sound identifier enum member
-
play
Play sound effect for player- Specified by:
playin interfaceSoundRepository- Parameters:
sender- the command sender (player) to play soundsoundId- the sound identifier enum member
-
play
Play sound effect for location- Specified by:
playin interfaceSoundRepository- Parameters:
location- the location at which to play soundsoundId- the sound identifier enum member
-
soundEffectsDisabled
public boolean soundEffectsDisabled()- Specified by:
soundEffectsDisabledin interfaceSoundRepository
-
matchLongest
- Specified by:
matchLongestin interfaceSoundRepository
-