Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException on server shutdown #214

Closed
NiklasEi opened this issue Jun 6, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@NiklasEi
Copy link
Contributor

commented Jun 6, 2019

The current bukkit module causes a ConcurrentModificationException when disabling a plugin that uses acf. I fixed it in my plugin by overwriting unregisterCommands(), but thought I might also provide a quick fix here.

> stop
[01:24:51 INFO]: Stopping the server
[01:24:51 INFO]: Stopping server
[01:24:51 INFO]: [GameBox] Disabling GameBox v2.2.5
[01:24:51 ERROR]: Could not pass event PluginDisableEvent to GameBox v2.2.5
java.util.ConcurrentModificationException: null
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445) ~[?:1.8.0_212]
	at java.util.HashMap$EntryIterator.next(HashMap.java:1479) ~[?:1.8.0_212]
	at java.util.HashMap$EntryIterator.next(HashMap.java:1477) ~[?:1.8.0_212]
	at me.nikl.gamebox.common.acf.BukkitCommandManager.unregisterCommands(BukkitCommandManager.java:278) ~[?:?]
	at me.nikl.gamebox.common.acf.ACFBukkitListener.onPluginDisable(ACFBukkitListener.java:48) ~[?:?]
	at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[patched_1.13.2.jar:git-Paper-629]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:520) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:362) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:444) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:431) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:424) ~[patched_1.13.2.jar:git-Paper-629]
	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.disablePlugins(CraftServer.java:377) ~[patched_1.13.2.jar:git-Paper-629]
	at net.minecraft.server.v1_13_R2.MinecraftServer.stop(MinecraftServer.java:652) ~[patched_1.13.2.jar:git-Paper-629]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:874) ~[patched_1.13.2.jar:git-Paper-629]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

NiklasEi added a commit to NiklasEi/commands that referenced this issue Jun 6, 2019

chickeneer added a commit that referenced this issue Jun 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.