Skip to content

Commit

Permalink
fix: play disc only if jukebox is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Dec 14, 2024
1 parent 9d5fcae commit 45c830d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- DISABLE — Disables any lore manipulations on burn/erase.
- REPLACE (default) — Replaces the whole lore with a string containing the song name on burn, and removes the lore completely on erase.
- APPEND — Adds a new line to the end of the lore on burn, and removes the last line on erase.
- Fixed clicking with a custom disc into a stopped jukebox with a disc already inside would cause it to play track without actually inserting the disc.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class JukeboxEventListener : Listener, PluginKoinComponent {

val jukebox = block.asJukebox() ?: return

if (jukebox.isPlaying) return
if (jukebox.record.type != Material.AIR) return

val item = event.item?.takeIf { it.isCustomDisc() } ?: return

Expand Down

0 comments on commit 45c830d

Please sign in to comment.