[SPIGOT-1668] Jukebox setPlaying API plays incorrect sound Created: 02/Mar/16  Updated: 02/Mar/16  Resolved: 02/Mar/16

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

Type: Bug Priority: Minor
Reporter: Dylan Xaldin Assignee: Thinkofname
Resolution: Fixed Votes: 0
Labels: 1.9, spigot


 Description   

I filed a report on Jukeboxes not working properly and playing an incorrect "kerklunk" sound when putting a record in them, which was fixed. (SPIGOT-1568)

I have now found out that using the Jukebox API to set the jukebox as playing also plays that incorrect sound and was not fixed from the standard jukebox fix.

This code worked in all versions of MC 1.8

        if (block.getState() instanceof Jukebox)
        {
            Jukebox jukebox = (Jukebox) block.getState();
            if (!block.isBlockPowered() && jukebox.isPlaying())
            {
                jukebox.setPlaying(jukebox.getPlaying());
            }
        }

Generated at Sun Mar 30 18:01:20 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.