mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-15 12:02:57 +01:00
SPIGOT-6436: Add Player#stopAllSounds
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
148964d14e
commit
e4cce46e63
@ -513,6 +513,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
getHandle().connection.sendPacket(new PacketPlayOutStopSound(new MinecraftKey(sound), category == null ? net.minecraft.sounds.SoundCategory.MASTER : net.minecraft.sounds.SoundCategory.valueOf(category.name())));
|
getHandle().connection.sendPacket(new PacketPlayOutStopSound(new MinecraftKey(sound), category == null ? net.minecraft.sounds.SoundCategory.MASTER : net.minecraft.sounds.SoundCategory.valueOf(category.name())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stopAllSounds() {
|
||||||
|
if (getHandle().connection == null) return;
|
||||||
|
|
||||||
|
getHandle().connection.sendPacket(new PacketPlayOutStopSound(null, null));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playEffect(Location loc, Effect effect, int data) {
|
public void playEffect(Location loc, Effect effect, int data) {
|
||||||
if (getHandle().connection == null) return;
|
if (getHandle().connection == null) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user