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

IllegalPluginAccessException on server shutdown #6801

Closed
1 task done
SlimeDog opened this issue Jun 20, 2024 · 3 comments
Closed
1 task done

IllegalPluginAccessException on server shutdown #6801

SlimeDog opened this issue Jun 20, 2024 · 3 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Comments

@SlimeDog
Copy link

SlimeDog commented Jun 20, 2024

Skript/Server Version

> skript info
[21:51:14 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[21:51:14 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[21:51:14 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[21:51:14 INFO]: [Skript] Server Version: 1.21-15-2df432f (MC: 1.21)
[21:51:14 INFO]: [Skript] Skript Version: 2.8.7-nightly-132cbf1 (skriptlang-nightly)
[21:51:14 INFO]: [Skript] Installed Skript Addons: None
[21:51:14 INFO]: [Skript] Installed dependencies: 
[21:51:14 INFO]: [Skript]  - Vault v1.7.3-b131
[21:51:14 INFO]: [Skript]  - WorldGuard v7.0.11-SNAPSHOT+2276-2bd426b

Bug Description

On server shutdown, Skript generates error attempting to register a task when disabled. The error may be a Paper issue, but starting here.

Expected Behavior

Clean plugin disable on server shutdown

Steps to Reproduce

  • Run Paper 1.21-15
  • Run Skript 2.8.7-nightly-132cbf1 (which fixes other issues, compared with release 2.8.7)
  • Stop server
  • Read error in console/log (below)

Errors or Screenshots

[21:53:07 INFO]: [Skript] Disabling Skript v2.8.7-nightly-132cbf1
[21:53:07 ERROR]: Error occurred while disabling Skript v2.8.7-nightly-132cbf1
org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.validate(CraftScheduler.java:550) ~[paper-1.21.jar:1.21-15-2df432f]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:226) ~[paper-1.21.jar:1.21-15-2df432f]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:211) ~[paper-1.21.jar:1.21-15-2df432f]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:175) ~[paper-1.21.jar:1.21-15-2df432f]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTask(CraftScheduler.java:144) ~[paper-1.21.jar:1.21-15-2df432f]
        at Skript-2.8.7-6103.jar/ch.njol.skript.structures.StructCommand.scheduleCommandSync(StructCommand.java:341) ~[Skript-2.8.7-6103.jar:?]
        at Skript-2.8.7-6103.jar/ch.njol.skript.structures.StructCommand.postUnload(StructCommand.java:334) ~[Skript-2.8.7-6103.jar:?]
        at Skript-2.8.7-6103.jar/ch.njol.skript.ScriptLoader.unloadScripts(ScriptLoader.java:845) ~[Skript-2.8.7-6103.jar:?]
        at Skript-2.8.7-6103.jar/ch.njol.skript.Skript.beforeDisable(Skript.java:1194) ~[Skript-2.8.7-6103.jar:?]
        at Skript-2.8.7-6103.jar/ch.njol.skript.Skript.onDisable(Skript.java:1204) ~[Skript-2.8.7-6103.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.21.jar:1.21-15-2df432f]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugins(PaperPluginInstanceManager.java:161) ~[paper-1.21.jar:1.21-15-2df432f]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugins(PaperPluginManagerImpl.java:97) ~[paper-1.21.jar:1.21-15-2df432f]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:541) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:598) ~[paper-1.21.jar:1.21-15-2df432f]
        at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:988) ~[paper-1.21.jar:1.21-15-2df432f]
        at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:845) ~[paper-1.21.jar:1.21-15-2df432f]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1295) ~[paper-1.21.jar:1.21-15-2df432f]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-15-2df432f]
        at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@APickledWalrus
Copy link
Member

Looks like the issue fixed by #6788

@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jun 20, 2024
@SlimeDog
Copy link
Author

Great. Thanks.

@sovdeeth sovdeeth added patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. PR available Issues which have a yet-to-be merged PR resolving it labels Jun 20, 2024
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jun 20, 2024
@APickledWalrus
Copy link
Member

This fix was merged and will be included in 2.9. I also added it into #6798 so you can update once the nightly build is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

No branches or pull requests

3 participants