Search in sources :

Example 1 with NamedSoundEffectMessage

use of net.glowstone.net.message.play.game.NamedSoundEffectMessage in project Glowstone by GlowstoneMC.

the class GlowPlayer method playSound.

@Override
public void playSound(Location location, String sound, SoundCategory category, float volume, float pitch) {
    if (location == null || sound == null) {
        return;
    }
    double x = location.getX();
    double y = location.getY();
    double z = location.getZ();
    session.send(new NamedSoundEffectMessage(sound, category, x, y, z, volume, pitch));
}
Also used : NamedSoundEffectMessage(net.glowstone.net.message.play.game.NamedSoundEffectMessage)

Aggregations

NamedSoundEffectMessage (net.glowstone.net.message.play.game.NamedSoundEffectMessage)1