mcMMO/src/main/java/com/gmail/nossr50/spout/SpoutSounds.java
GJ ac7ed67d91 We're now using Bukkit sounds instead of Spout sounds - only
current exception is the custom level-up sound.
2013-01-29 18:36:16 -05:00

41 lines
1.4 KiB
Java

package com.gmail.nossr50.spout;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.getspout.spoutapi.SpoutManager;
import org.getspout.spoutapi.player.SpoutPlayer;
import org.getspout.spoutapi.sound.SoundEffect;
import org.getspout.spoutapi.sound.SoundManager;
import com.gmail.nossr50.mcMMO;
public class SpoutSounds {
/**
* Play sound effect through Spout.
*
* @param effect The sound effect to play
* @param player The player to play the sound to
* @param location The location the sound should come from
*/
public static void playSoundForPlayer(SoundEffect effect, Player player, Location location) {
SoundManager soundManager = SpoutManager.getSoundManager();
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
soundManager.playSoundEffect(spoutPlayer, effect, location);
}
/**
* Play noise on level-up.
*
* @param player The player who leveled up
*/
protected static void playLevelUpNoise(Player player, mcMMO plugin) {
SoundManager soundManager = SpoutManager.getSoundManager();
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
//If this is pulling from online, why have it in the jar?
soundManager.playCustomSoundEffect(plugin, spoutPlayer, "level.wav", false);
}
}