public void playSoundEffect(SpoutPlayer target, SoundEffect effect, Location location, int distance, int volumePercent) {
if (target.isSpoutCraftEnabled()) {
SpoutCraftPlayer ccp = (SpoutCraftPlayer) target;
if (location == null || ccp.getWorld().equals(location.getWorld())) {
if (location == null) {
ccp.sendPacket(new PacketPlaySound(effect, distance, volumePercent));
} else {
ccp.sendPacket(new PacketPlaySound(effect, location, distance, volumePercent));
}
}
}
}