Package ch.njol.skript.bukkitutil
Class SoundUtils
java.lang.Object
ch.njol.skript.bukkitutil.SoundUtils
Utility class for working with sounds.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable org.bukkit.NamespacedKey
Gets the key of a sound, given its enum-name-style name.static @NotNull org.bukkit.NamespacedKey
getKey
(org.bukkit.Sound sound) returns the key string for a sound.static @Nullable org.bukkit.Sound
Retrieves the sound correlating to the providedsoundString
-
Constructor Details
-
SoundUtils
public SoundUtils()
-
-
Method Details
-
getKey
Gets the key of a sound, given its enum-name-style name.- Parameters:
soundString
- The enum name to use to find the sound.- Returns:
- The key of the sound.
-
getKey
@NotNull public static @NotNull org.bukkit.NamespacedKey getKey(org.bukkit.Sound sound) returns the key string for a sound. For version compat.- Parameters:
sound
- The sound to get the key string of.- Returns:
- The key string of the
NamespacedKey
of the sound.
-
getSound
Retrieves the sound correlating to the providedsoundString
- Parameters:
soundString
- The string to get the correlating sound- Returns:
- The correlating
Sound
-