mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
SPIGOT-6436: Add Player#stopAllSounds
This commit is contained in:
parent
eb19161294
commit
b58f4299c6
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue