Test-Account666 / PlugManX

Plugin manager for Bukkit servers.
https://www.spigotmc.org/resources/plugman-improved.88135/
MIT License
103 stars 43 forks source link

Fix #39 #40

Closed KojiTadokoro114 closed 1 month ago

KojiTadokoro114 commented 1 month ago

It is a simple issue. just fix it by "remove after traverse commands".

Test-Account666 commented 1 month ago

This made absolutely no difference for me

KojiTadokoro114 commented 1 month ago

This made absolutely no difference for me

Have you ever try your and my version in Paper-1.20.6?

On your version (2.3.8),when unload a plugin with bukkit style registered command: https://pastebin.com/2MZKLbM8

My version fix that.

Test-Account666 commented 1 month ago

This made absolutely no difference for me

Have you ever try your and my version in Paper-1.20.6?

On your version (2.3.8),when unload a plugin with bukkit style registered command: https://pastebin.com/2MZKLbM8

My version fix that.

I did test it on the latest paper 1.20.6.

Both versions throw an error, but work just fine in the end for me

KojiTadokoro114 commented 1 month ago

This made absolutely no difference for me

Have you ever try your and my version in Paper-1.20.6? On your version (2.3.8),when unload a plugin with bukkit style registered command: https://pastebin.com/2MZKLbM8 My version fix that.

I did test it on the latest paper 1.20.6.

Both versions throw an error, but work just fine in the end for me

Can you give me the error StackTrace?

In fact, there two type of error, one is UnsupportedOperation, which will create a fatal error on unload plugin so that it can't unloaded. Another is ConcurrentModification, but it won't effect the unload operation.

Thank you!

Test-Account666 commented 1 month ago

Yes, the ConcurrentModification Exception is what I'm getting.

I know that there seems to be an issue with PlugManX, but I cannot reproduce it.

I could just merge and upload, but I'm unsure if I should, if I cannot reproduce the issue

KojiTadokoro114 commented 1 month ago

Yes, the ConcurrentModification Exception is what I'm getting.

I know that there seems to be an issue with PlugManX, but I cannot reproduce it.

I could just merge and upload, but I'm unsure if I should, if I cannot reproduce the issue

As the stacktrace I posted, this issue (ConcurrentModification) is caused by multi-thread operation by paper. To reproduce it, you can input a command provided by a plugin (don't send it) and reload the plugin from console. This new version completely fixed it. image

Test-Account666 commented 1 month ago

Have you also tested executing the command after (un-)loading?

That's also another issue as Paper has changed the command system

KojiTadokoro114 commented 1 month ago

Have you also tested executing the command after (un-)loading?

That's also another issue as Paper has changed the command system

After loading is ok, as well as its behavior in 1.20.4 But reloading have some issue, there some issues on vanilla command check (I'm still working on it).

KojiTadokoro114 commented 1 month ago

Interestingly, ConcurrentModification is caused by code in unload method (bukkitutil -> update). In order to avoid from destroy the plugin in legacy version of Paper, I use a nother class to process plugin unload of paper 1.20.5+

Test-Account666 commented 1 month ago

I'll do some testing.

I appreciate the help! :)

Test-Account666 commented 1 month ago

Direct merge was not possible as I was working on some formatting changes.

Thanks for your help :)