use of cn.nukkit.network.protocol.PlaySoundPacket in project Nukkit by Nukkit.
the class BlockEntityJukebox method play.
public void play() {
if (this.recordItem instanceof ItemRecord) {
PlaySoundPacket pk = new PlaySoundPacket();
pk.name = ((ItemRecord) this.recordItem).getSoundId();
pk.pitch = 1;
pk.volume = 1;
pk.x = getFloorX();
pk.y = getFloorY();
pk.z = getFloorZ();
Server.broadcastPacket(this.level.getPlayers().values(), pk);
}
}
Aggregations