There should be a feature to change the `has_record` value.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/type/Jukebox.html
has_record is not a useless value; if has_record is true but there is no record inside the jukebox, players will not be able to add/remove a record to/from that jukebox. This is quite important in certain special scenarios.