koca2000 / NoteBlockAPI

https://www.spigotmc.org/resources/noteblockapi.19287/
GNU Lesser General Public License v3.0
119 stars 40 forks source link

Plugin not properly shutting down #80

Closed srnyx closed 2 years ago

srnyx commented 2 years ago

Happens when I stop/restart my server (it's spammed like 100 times): https://paste.srnyx.xyz/fusucolewu.md

koca2000 commented 2 years ago

Hi! I am sorry for late reply. I must have missed it. Would you please give me some more information about your server? When NoteBlockAPI's onDisable method is called it sets a flag for all SongPlayer's that they should end themself which happens after it's thread wakes up. It looks like your server doesn't like to wait a few milisecond.

srnyx commented 2 years ago

Would you please give me some more information about your server?

Purpur 1.117.1 Music plugin: https://www.spigotmc.org/resources/advancednbs.81195/

koca2000 commented 2 years ago

I pushed a commit with the fix. I was already cancelling all Bukkit scheduler tasks but according to CraftBukkit source code it doesn't interrupt running threads.