AvarionMC / graves

GNU General Public License v3.0
23 stars 4 forks source link

Incompatible with GriefPrevention and Skript #57

Closed Jikoo closed 1 month ago

Jikoo commented 1 month ago

Checks

Version

02982f895e118d1ed97fa72b905d19aab2616e19

Server version

Paper 1.20.1196

Plugin list

Graves, GriefPrevention, Skript, optionally ItemsAdder

Expected behavior

Server should load.

Actual behavior

Circular dependencies cause server to not load.

Stacktrace if applicable (no screenshots!)

Add stacktrace below: ```python [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] Circular plugin loading detected! [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] Circular load order: [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] Skript -> GriefPrevention -> Graves -> Skript [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] Skript -> GriefPrevention -> Graves -> ItemsAdder -> Skript [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] Please report this to the plugin authors of the first plugin of each loop or join the PaperMC Discord server for further help. [18:44:38] [Server thread/ERROR]: [SimpleProviderStorage] If you would like to still load these plugins, acknowledging that there may be unexpected plugin loading issues, run the server with -Dpaper.useLegacyPluginLoading=true [18:44:38] [Server thread/ERROR]: Encountered an unexpected exception java.lang.IllegalStateException: Circular plugin loading from plugins Skript, Skript at io.papermc.paper.plugin.storage.SimpleProviderStorage.handleCycle(SimpleProviderStorage.java:78) ~[paper-1.20.1.jar:git-Paper-196] at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:43) ~[paper-1.20.1.jar:git-Paper-196] at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.1.jar:git-Paper-196] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:510) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:273) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196] at java.lang.Thread.run(Thread.java:1583) ~[?:?] ```

Additional information

Info pulled from GriefPrevention/GriefPrevention#2336

https://github.com/AvarionMC/graves/blob/02982f895e118d1ed97fa72b905d19aab2616e19/src/main/resources/plugin.yml#L9-L30 https://github.com/SkriptLang/Skript/blob/0e10975d55b87b742a38ed9f4b01e9cfead1269d/src/main/resources/plugin.yml#L41

svaningelgem commented 1 month ago

Thanks for the excellently written bug report @Jikoo! Could you give me the version of the plugins that you used? Because with paper-1.20.6-147.jar, GriefPrevention-16.18.4, Skript-v2.9.0 and the latest commit of today of Graves, it works just fine:

Starting org.bukkit.craftbukkit.Main
*** Warning, you've not updated in a while! ***
*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***
System Info: Java 21 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS) Host: Windows 10 10.0 (amd64)
Loading libraries, please wait...
[14:11:24 WARN]: [oshi.util.platform.windows.PerfDataUtil] Failed to add PDH Counter: \Paging File(_Total)\% Usage, Error code: 0xC0000BB8
[14:11:24 WARN]: [oshi.util.platform.windows.PerfCounterQueryHandler] Failed to add counter for PDH counter: \Paging File(_Total)\% Usage
[14:11:24 WARN]: [oshi.util.platform.windows.PerfCounterQuery] Disabling further attempts to query Paging File.
[14:11:25 WARN]: [oshi.util.platform.windows.WmiQueryHandler] COM exception: Invalid Query: SELECT PERCENTUSAGE FROM Win32_PerfRawData_PerfOS_PagingFile
[14:11:25 INFO]: [ReobfServer] Remapping server...
[14:11:28 INFO]: [ReobfServer] Done remapping server in 3010ms.
[14:11:28 INFO]: [PluginRemapper] Remapping plugin 'plugins\ProtocolLib-5.3.0-20240608.171401-1-all.jar'...
[14:11:28 INFO]: [PluginRemapper] Remapping plugin 'plugins\Skript-2.9.0.jar'...
[14:11:29 INFO]: [PluginRemapper] Done remapping plugin 'plugins\Skript-2.9.0.jar' in 390ms.
[14:11:29 INFO]: [PluginRemapper] Remapping plugin 'plugins\GriefPrevention.jar'...
[14:11:29 INFO]: [PluginRemapper] Done remapping plugin 'plugins\GriefPrevention.jar' in 63ms.
[14:11:29 INFO]: [PluginRemapper] Remapping plugin 'plugins\Graves-0.0.0-SNAPSHOT.jar'...
[14:11:29 INFO]: [PluginRemapper] Done remapping plugin 'plugins\Graves-0.0.0-SNAPSHOT.jar' in 109ms.
[14:11:29 INFO]: [PluginRemapper] Done remapping plugin 'plugins\ProtocolLib-5.3.0-20240608.171401-1-all.jar' in 586ms.
[14:11:33 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[14:11:34 INFO]: Loaded 1175 recipes
[14:11:34 INFO]: Loaded 1276 advancements
[14:11:34 INFO]: Starting minecraft server version 1.20.6
[14:11:34 INFO]: Loading properties
[14:11:34 INFO]: This server is running Paper version 1.20.6-147-ver/1.20.6@e41d44f (2024-06-17T19:24:35Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
[14:11:35 INFO]: Server Ping Player Sample Count: 12
[14:11:35 INFO]: Using 4 threads for Netty based IO
[14:11:35 WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future.
    We recommend installing the spark profiler as a replacement: https://spark.lucko.me/
    For more information please visit: https://github.com/PaperMC/Paper/issues/8948
[14:11:35 INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 8 worker threads, and gen parallelism of 8 threads
[14:11:36 INFO]: Default game type: SURVIVAL
[14:11:36 INFO]: Generating keypair
[14:11:36 INFO]: Starting Minecraft server on *:25565
[14:11:36 INFO]: Using default channel type
[14:11:36 INFO]: Paper: Using Java compression from Velocity.
[14:11:36 INFO]: Paper: Using Java cipher from Velocity.
[14:11:37 INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.4
[14:11:37 INFO]: [ProtocolLib] Loading server plugin ProtocolLib v5.3.0-SNAPSHOT
[14:11:37 WARN]: [ProtocolLib] Version (MC: 1.20.6) has not yet been tested! Proceed with caution.
[14:11:38 INFO]: [Skript] Loading server plugin Skript v2.9.0
[14:11:38 INFO]: [Graves] Loading server plugin Graves v0.0.0-SNAPSHOT
[14:11:38 INFO]: Server permissions file permissions.yml is empty, ignoring it
[14:11:38 INFO]: [ProtocolLib] Enabling ProtocolLib v5.3.0-SNAPSHOT
[14:11:38 INFO]: Preparing level "world"
[14:11:39 INFO]: Preparing start region for dimension minecraft:overworld
[14:11:40 INFO]: Time elapsed: 1076 ms
[14:11:40 INFO]: Preparing start region for dimension minecraft:the_nether
[14:11:40 INFO]: Time elapsed: 177 ms
[14:11:40 INFO]: Preparing start region for dimension minecraft:the_end
[14:11:41 INFO]: Time elapsed: 269 ms
[14:11:41 INFO]: [GriefPrevention] Enabling GriefPrevention v16.18.4
[14:11:41 INFO]: [GriefPrevention] Finished loading configuration.
[14:11:41 INFO]: [GriefPrevention] 0 total claims loaded.
[14:11:41 INFO]: [GriefPrevention] Customizable messages loaded.
[14:11:41 INFO]: [GriefPrevention] Finished loading data (File Mode).
[14:11:41 INFO]: [GriefPrevention] Boot finished.
[14:11:41 INFO]: [Skript] Enabling Skript v2.9.0
[14:11:41 INFO]: [Skript] Successfully generated the config and the example scripts.
[14:11:42 INFO]: [Skript] You're currently running the latest stable version of Skript.
[14:11:45 INFO]: [Skript] Loaded 233068 aliases in 3332ms
[14:11:45 INFO]: [Skript]  ~ created by & © Peter Güttinger aka Njol ~
[14:11:45 INFO]: [Graves] Enabling Graves v0.0.0-SNAPSHOT
[14:11:45 INFO]: [Graves] Integration: Hooked into ProtocolLib 5.3.0-SNAPSHOT.
[14:11:45 INFO]: [Graves] Integration: Hooked into MiniMessage.
[14:11:45 INFO]: Running delayed init tasks
[14:11:45 INFO]: [Skript] Loading variables...
[14:11:45 INFO]: [Skript] Loaded 0 variables in 0.0 seconds
[14:11:45 INFO]: [Skript] All scripts loaded without errors.
[14:11:45 INFO]: [Skript]     No scripts were found, maybe you should write some ;)
[14:11:45 INFO]: [Skript] Finished loading.
[14:11:45 INFO]: Done (10.932s)! For help, type "help"
[14:11:45 INFO]: Timings Reset
[14:11:45 INFO]: [Graves] Update: Outdated version detected 0.0.0-SNAPSHOT, latest version is 4.9.4, https://www.spigotmc.org/resources/116202/
Jikoo commented 1 month ago

Weird, I'm sorry. I'm also unable to reproduce using the exact setup from the report, and I'm pretty sure ItemsAdder is premium, so I'm not gonna go digging around for a download for that. After seeing you were using 1.20.6 I assumed it was just a Paper change, but even on the exact build the reporter was running I can't replicate. They did claim "latest" GP, which requires 1.20.6+, so the report is a little shaky to start with.

My own logs ``` [09:16:24] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [09:16:25] [ServerMain/INFO]: Loaded 7 recipes [09:16:26] [Server thread/INFO]: Starting minecraft server version 1.20.1 [09:16:26] [Server thread/INFO]: Loading properties [09:16:26] [Server thread/INFO]: This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72) [09:16:26] [Server thread/INFO]: Server Ping Player Sample Count: 12 [09:16:26] [Server thread/INFO]: Using 4 threads for Netty based IO [09:16:27] [Server thread/WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future. We recommend installing the spark profiler as a replacement: https://spark.lucko.me/ For more information please visit: https://github.com/PaperMC/Paper/issues/8948 [09:16:27] [Server thread/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 1 worker threads, and gen parallelism of 1 threads [09:16:27] [Server thread/INFO]: Default game type: SURVIVAL [09:16:27] [Server thread/INFO]: Generating keypair [09:16:27] [Server thread/INFO]: Starting Minecraft server on *:25565 [09:16:27] [Server thread/INFO]: Using default channel type [09:16:27] [Server thread/INFO]: Paper: Using Java compression from Velocity. [09:16:27] [Server thread/INFO]: Paper: Using Java cipher from Velocity. [09:16:27] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.3 [09:16:27] [Server thread/INFO]: [Skript] Loading server plugin Skript v2.9.0 [09:16:27] [Server thread/INFO]: [Graves] Loading server plugin Graves v4.9.4 [09:16:27] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it [09:16:27] [Server thread/INFO]: Preparing level "world" [09:16:28] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld [09:16:28] [Server thread/INFO]: Time elapsed: 160 ms [09:16:28] [Server thread/INFO]: Preparing start region for dimension minecraft:the_nether [09:16:28] [Server thread/INFO]: Time elapsed: 19 ms [09:16:28] [Server thread/INFO]: Preparing start region for dimension minecraft:the_end [09:16:28] [Server thread/INFO]: Time elapsed: 18 ms [09:16:28] [Server thread/INFO]: [GriefPrevention] Enabling GriefPrevention v16.18.3 [09:16:28] [Server thread/INFO]: [GriefPrevention] Finished loading configuration. [09:16:28] [Server thread/INFO]: [GriefPrevention] 0 total claims loaded. [09:16:28] [Server thread/INFO]: [GriefPrevention] Customizable messages loaded. [09:16:28] [Server thread/INFO]: [GriefPrevention] Finished loading data (File Mode). [09:16:28] [Server thread/INFO]: [GriefPrevention] Boot finished. [09:16:28] [Server thread/INFO]: [Skript] Enabling Skript v2.9.0 [09:16:29] [ForkJoinPool.commonPool-worker-1/INFO]: [Skript] You're currently running the latest stable version of Skript. [09:16:35] [Server thread/INFO]: [Skript] Loaded 232918 aliases in 6186ms [09:16:35] [Server thread/INFO]: [Skript] ~ created by & © Peter Güttinger aka Njol ~ [09:16:35] [Server thread/INFO]: [Graves] Enabling Graves v4.9.4 [09:16:35] [Server thread/INFO]: [Graves] Integration: Hooked into MiniMessage. [09:16:35] [Server thread/INFO]: Running delayed init tasks [09:16:35] [Server thread/INFO]: [Skript] Loading variables... [09:16:35] [Server thread/INFO]: [Skript] Loaded 0 variables in 0.0 seconds [09:16:35] [Server thread/INFO]: [Skript] All scripts loaded without errors. [09:16:35] [Server thread/INFO]: [Skript] No scripts were found, maybe you should write some ;) [09:16:35] [Server thread/INFO]: [Skript] Finished loading. [09:16:35] [Server thread/INFO]: Done (9.858s)! For help, type "help" [09:16:35] [Server thread/INFO]: Timings Reset ```

Pinging @realBritakee as I opened this from their issue. Is there some secret config setting in Paper that makes softdepends act similar to dependencies? Do you have Paper plugins (ones with a paper-plugin.yml) installed as well as regular Bukkit plugins?

Jikoo commented 1 month ago

On more reading, pretty sure this behavior is only visible if a Paper plugin is present. https://docs.papermc.io/paper/dev/getting-started/paper-plugins#cyclic-plugin-loading I'll be honest, struggling to find a pure Paper plugin with a paper-plugin.yml to test with, though I guess I could make my own.

As a stopgap, could we just remove GP from the loadbefore? I believe all usages inside Graves are done via ProtectionLib, so it shouldn't even need to be a soft dependency (though honestly, adding a real integration might be better, I believe ProtectionLib uses a deprecated method). As can be seen from both of our logs, if Skript is present, Graves loads after GP anyway.

svaningelgem commented 1 month ago

Thanks for the new information. I don't really know why ranull put this in there, because I don't see any reference to griefprevention in the code. So I removed it until someone says it makes GP fail in some way...

Let's see.