It is difficult to cancel the disc playing at the moment of its insertion, and when canceling later, for some reason the playback does not stop (probably a vanilla bug). As a result, now I see 2 ways to undo a record playing:
1) intercept the PacketPlayOutWorldEvent and undo if it's a desired jukebox.
2) check PlayerInteractEvent with a bunch of conditions, but you can easily miss some of them.
Therefore, I propose to introduce events related to insertion and removal of discs. On inserting, the event will fire before a packet is created, and if the event is canceled, a packet will not be sent.
Also, it's hard to work with jukeboxes at the moment, as Jukebox#stopPlaying() doesn't even change the state of Jukebox#isPlaying() for some reason.
(I don't report it as a bug, because stopPlaying() actually works, but it may not work while lags)