You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lorenzo Rossi edited this page Feb 28, 2018
·
1 revision
This is a minor API that helps solving common problems related to spigot sounds.
CompatibleSound
This helps translating 1.9 sounds names to 1.8 sounds instances, if the version is grater than 1.8 it could be used as a normal lookup-map.
Usage:
Soundsound = CompatibleSound.get("ambient cave");// Case-insensitive and can replace spaces with _Soundother = CompatibleSound.getRaW("AMBIENT_CAVE");// This requires the input to match exactly the enum
PlaySound
A class that holds sound, volume and pitch in a single instance (everything changable via Placeholders)
// sound, volume, pitchPlaySoundsound = PlaySound.of(Sound.BLOCK_ANVIL_BREAK, 1.1, 1.0);
// WARNING: NOT 1.8 COMPATIBLE, use CompatibleSound in real codesound.play(newLocation(world, 0, 0, 0));
sound.play(player);