Skip to content

Commit

Permalink
Cancel the task when calling stop
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 committed Mar 9, 2024
1 parent d830e03 commit 072e429
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class SongPlayerImpl(private val plugin: Any, private val proxyServer: ProxyServ
}

override fun stop(player: Player) {
statuses[player]?.task?.cancel()
statuses[player]?.song?.let { song ->
proxyServer.eventManager.fireAndForget(SongEndEvent(player, song))
}
Expand Down

0 comments on commit 072e429

Please sign in to comment.