When attempting to reload the Clan.sk script on my Minecraft server, a ConcurrentModificationException is thrown. This seems to be related to the command registration process.
Steps to Reproduce
Start the server.
Run the command to reload the Clan.sk script.
Observe the console for the error.
Expected Behavior
The Clan.sk script should reload without any errors.
Errors / Screenshots
[13:12:18 INFO]: [Skript] Reloading Clan.sk...
[13:12:19 ERROR]: Caught previously unhandled exception :
[13:12:19 ERROR]: Paper Async Command Builder Thread Pool - 183
java.util.ConcurrentModificationException: null
at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:1023) ~[?:?]
at java.base/java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:1052) ~[?:?]
at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:552) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
at net.minecraft.commands.Commands.sendAsync(Commands.java:515) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
at net.minecraft.commands.Commands.lambda$sendCommands$5(Commands.java:488) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[13:12:19 INFO]: [PlaceholderAPI] Successfully registered internal expansion: clan [1.6.0]
[13:12:19 INFO]: [Skript] Successfully reloaded Clan.sk. (585ms)
Server Information
Server version/platform: Purpur 1.20.6-2227-79d199c (MC: 1.20.6)
skript-placeholders version: v1.6.0
Skript version: 2.8.6
PlaceholderAPI version (if applicable): 1.6.0
MVdWPlaceholderAPI version (if applicable): Not applicable
Additional Context
This issue appears to be related to the asynchronous command registration process. The error suggests that the commands map is being modified by multiple threads concurrently, which is not thread-safe. I suspect this may be an issue with how commands are registered or modified in the Clan.sk script or a related plugin.
The solution might involve ensuring proper synchronization of the commands map or reviewing the asynchronous logic used in the command registration process.
Description
When attempting to reload the
Clan.sk
script on my Minecraft server, aConcurrentModificationException
is thrown. This seems to be related to the command registration process.Steps to Reproduce
Clan.sk
script.Expected Behavior
The
Clan.sk
script should reload without any errors.Errors / Screenshots
Server Information
Additional Context
This issue appears to be related to the asynchronous command registration process. The error suggests that the commands map is being modified by multiple threads concurrently, which is not thread-safe. I suspect this may be an issue with how commands are registered or modified in the
Clan.sk
script or a related plugin.The solution might involve ensuring proper synchronization of the commands map or reviewing the asynchronous logic used in the command registration process.