[SPIGOT-7313] Jukebox.setRecord(null) is not emptying the the jukebox Created: 23/Mar/23  Updated: 25/Dec/24  Resolved: 29/Mar/23

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

Type: Bug Priority: Minor
Reporter: Andrea Bonari Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.19.4, Jukebox.setPlaying(), jukebox
Environment:

OS: Windows and Linux

Java version: java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)


Issue Links:
Relates
relates to SPIGOT-7308 Null Exception when trying to run Juk... Resolved
Version:  This server is running CraftBukkit version 3697-Spigot-6ad4b93-9381350 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When trying to run this block of code

val jukebox = location.block.state as Jukebox

jukebox.setRecord(null)
jukebox.update(true) 

The jukebox is not emptied



 Comments   
Comment by Andrea Bonari [ 24/Mar/23 ]

Yeah, I noticed that in the repo, thank you for that, my plugin is all about jukeboxes and that was really useful. I was actually using the latest version build with BuildTools for this issue and this was the only thing that wasn't working.

Comment by Parker Hawke [ 24/Mar/23 ]

I've taken the liberty of just cleaning up jukeboxes as a whole. Hopefully fixing this issue and providing some more accurate API. Waiting on bukkit#835 and craftbukkit#1158

Generated at Tue Apr 22 07:36:21 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.