#752: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
By: Martoph <sager1018@gmail.com>
This commit is contained in:
@@ -475,7 +475,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) {
|
||||
if (loc == null || sound == null || category == null || getHandle().playerConnection == null) return;
|
||||
|
||||
PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(CraftSound.getSound(sound)), net.minecraft.server.SoundCategory.valueOf(category.name()), loc.getX(), loc.getY(), loc.getZ(), volume, pitch);
|
||||
PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(sound), net.minecraft.server.SoundCategory.valueOf(category.name()), loc.getX(), loc.getY(), loc.getZ(), volume, pitch);
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void stopSound(Sound sound, org.bukkit.SoundCategory category) {
|
||||
stopSound(CraftSound.getSound(sound), category);
|
||||
stopSound(sound.getKey().getKey(), category);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user