[SPIGOT-1891] world.playNote(); and player.playNote(); have their volume depending on the music slider Created: 11/Mar/16  Updated: 13/Nov/17  Resolved: 13/Nov/17

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Sander Knauff Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.9, bukkit
Environment:

Client: Windows 10 x64 | Server: Ubuntu Server 14.04LTS



 Description   

Playing sounds using either the player.playNote(); or world.playNote(); methods send their sound packets with an empty source data. This causes the client to play the notes to the default channel (Music) while there is a slider available for Noteblocks and Jukebox sounds.

Steps to reproduce:
1. Turn down music volume slider.
2. Place and activate a noteblock. a sound will be heard.
3. send a note to the player using the bukkit methods. No sounds can be heard.
4. Turn up the music volume slider.
5. Send a note to the client again. This time the note should play normally.

Suggested fix:
Add the Sound Catagory to the packet that gets send after triggering player/world.playNote();



 Comments   
Comment by PseudoKnight [ 13/Nov/17 ]

Now that sound categories have been added, this is still an issue for these particular methods. SoundCategory.MUSICĀ is probably incorrect for this type of sound (something almost everyone turns off, making this method even less useful). Maybe it should be RECORDS ("Jukebox/Note Blocks" in client) or just MASTER.

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java#286

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java#327

Comment by md_5 [ 11/Mar/16 ]

SPIGOT-1881

Comment by Sander Knauff [ 11/Mar/16 ]

I just noticed there is no world.playNote() but the issue still applies to players.

EDIT: Also minecraft seems to play the noteblock sounds on the "blocks" channel instead of the expected "Jukebox/Noteblocks" channel. This is an issue in minecraft itself and is already reported to Mojang.

Generated at Sat Dec 13 15:21:12 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.