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

Command error at shutdown #451

Closed
stijnb1234 opened this issue Aug 9, 2022 · 5 comments
Closed

Command error at shutdown #451

stijnb1234 opened this issue Aug 9, 2022 · 5 comments

Comments

@stijnb1234
Copy link

Info

Please provide the following information:

  • BkCommonLib Version (/train version): v1.19.2-v1 (build: 1352)
  • TrainCarts Version (/train version): v1.19.2-v1-SNAPSHOT (build: 1164)
  • Server Type and Version (/version): git-Paper-119 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: e6f8284)

Bug

Description

When I shutdown the server, I get an error.

Expected behaviour

There should be no error.

Actual behaviour

It gives an error.

Steps to reproduce

  1. Setup a new PaperSpigot 1.19.2 server.
  2. Put the latest builds of BKCommonLib and TrainCarts in the server.
  3. Start the server, do some things, and stop it again.
  4. You see the error.

Additional Information

The error I get:

[10:15:10 INFO]: [Train_Carts] Disabling Train_Carts v1.19.2-v1-SNAPSHOT
[10:15:10 ERROR]: Could not pass event PluginDisableEvent to Train_Carts v1.19.2-v1-SNAPSHOT
java.util.concurrent.RejectedExecutionException: Task net.minecraft.commands.CommandDispatcher$$Lambda$8229/0x00000008024b2698@33b6683 rejected from java.util.concurrent.ThreadPoolExecutor@3bd7073e[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1365) ~[?:?]
        at net.minecraft.commands.Commands.sendCommands(Commands.java:376) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer.updateCommands(CraftPlayer.java:2550) ~[paper-1.19.2.jar:git-Paper-119]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) ~[?:?]
        at com.bergerkiller.bukkit.common.dep.cloud.bukkit.BukkitPluginRegistrationHandler.unregisterRootCommand(BukkitPluginRegistrationHandler.java:170) ~[BKCommonLib-1.19.2-v1-1352.jar:?]
        at com.bergerkiller.bukkit.common.dep.cloud.CommandManager.deleteRootCommand(CommandManager.java:545) ~[BKCommonLib-1.19.2-v1-1352.jar:?]
        at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
        at com.bergerkiller.bukkit.common.dep.cloud.bukkit.CloudBukkitListener.onPluginDisable(CloudBukkitListener.java:54) ~[BKCommonLib-1.19.2-v1-1352.jar:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:git-Paper-119]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:670) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:393) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:579) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:556) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.disablePlugins(CraftServer.java:499) ~[paper-1.19.2.jar:git-Paper-119]
        at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:933) ~[paper-1.19.2.jar:git-Paper-119]
        at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:781) ~[paper-1.19.2.jar:git-Paper-119]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1231) ~[paper-1.19.2.jar:git-Paper-119]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-119]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[10:15:10 INFO]: [Train_Carts] Train_Carts disabled!
@bergerkiller
Copy link
Member

Oh that looks like a Cloud bug, Ill forward it to them

@bergerkiller
Copy link
Member

bergerkiller commented Aug 9, 2022

It probably has no effect as only the plugin disable event handler gets hit, so the plugin still disables normally. This would be a problem for /reload though

@stijnb1234
Copy link
Author

It probably has no effect as only the plugin disable event handler gets hit, so the plugin still disables normally. This would be a problem for /reload though

It indeed does not affect functionality, but still something the Cloud developers should look into. 😛

@bergerkiller
Copy link
Member

PaperMC/Paper#8272 might be related

@Owen1212055
Copy link

Correct, that is related and will be resolved by that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants