diff options
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 1df2579e..b89f9170 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -311,6 +311,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override + public void stopSound(Sound sound) { + stopSound(CraftSound.getSound(sound)); + } + + @Override + public void stopSound(String sound) { + if (getHandle().playerConnection == null) return; + PacketDataSerializer packetdataserializer = new PacketDataSerializer(Unpooled.buffer()); + + packetdataserializer.a(sound); + packetdataserializer.a(""); + getHandle().playerConnection.sendPacket(new PacketPlayOutCustomPayload("MC|StopSound", packetdataserializer)); + } + + @Override public void playEffect(Location loc, Effect effect, int data) { if (getHandle().playerConnection == null) return; |