Skript

Skript

743k Downloads

IllegalPluginAccessException on server shutdown

SlimeDog opened this issue ยท 3 comments

commented

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.
commented

Looks like the issue fixed by #6788

commented

Great. Thanks.

commented

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.