3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

Add Player.stopSound

Dieser Commit ist enthalten in:
md_5 2016-06-11 09:13:54 +10:00
Ursprung 6cbdec1f15
Commit 46233ffa8f

Datei anzeigen

@ -310,6 +310,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().playerConnection.sendPacket(packet);
}
@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;