Andavin / Images

A custom image loading plugin for Spigot.
66 stars 30 forks source link

Add Reload Support? #2

Closed jeffry1829 closed 4 years ago

jeffry1829 commented 4 years ago

When I do /plugman unload Images, and then load back, the image i just create is no longer removable, I just can't break the image(even with /image delete ...). And I thought there's no onDisable()? Async threads are not cancel when I unload the plugin?

Andavin commented 4 years ago

Yeah pretty much no effort is given to cleaning up spawned images on disabling of the plugin. Images were most likely replaced or duplicated while the entities themselves were either duplicated or the IDs messed up and no longer correspond to the image.

In any case, I will consider adding this, but anyone is also free to add a pull request.

pquerner commented 4 years ago

Do you mean by reload support to reload images from disk and redraw ?

Andavin commented 4 years ago

What I mean by reload support is fully reloading the plugin by disabling it and re-enabling cleaning up all objects in the process. For example, removing all images and reloading them from the database on re-enable etc.

pquerner commented 4 years ago

So closing this issue means its not wanted?