summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2016-03-02 16:02:36 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2016-03-02 16:02:36 +0000
commitbad994e7243d0cc0c63cdfae625eb7c69a30ae03 (patch)
tree4d6773733a86b651a9e3ac42a509f4dd2d69c712 /src/main/java/org
parent09b4549a29bacf3d18ae85ce926c692cb28004af (diff)
downloadcraftbukkit-bad994e7243d0cc0c63cdfae625eb7c69a30ae03.tar
craftbukkit-bad994e7243d0cc0c63cdfae625eb7c69a30ae03.tar.gz
craftbukkit-bad994e7243d0cc0c63cdfae625eb7c69a30ae03.tar.lz
craftbukkit-bad994e7243d0cc0c63cdfae625eb7c69a30ae03.tar.xz
craftbukkit-bad994e7243d0cc0c63cdfae625eb7c69a30ae03.zip
Don't round the location of playSound to the center of a block
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6d700fa6..0f9eeb96 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -306,11 +306,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void playSound(Location loc, String sound, float volume, float pitch) {
if (loc == null || sound == null || getHandle().playerConnection == null) return;
- double x = loc.getBlockX() + 0.5;
- double y = loc.getBlockY() + 0.5;
- double z = loc.getBlockZ() + 0.5;
-
- PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(sound), SoundCategory.MASTER, x, y, z, volume, pitch);
+ PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(sound), SoundCategory.MASTER, loc.getX(), loc.getY(), loc.getZ(), volume, pitch);
getHandle().playerConnection.sendPacket(packet);
}