BentoBoxWorld / SkyGrid

SkyGrid gamemode addon for BentoBox
Eclipse Public License 2.0
8 stars 3 forks source link

Skygrid not liking SQL #67

Open rackgaming opened 9 months ago

rackgaming commented 9 months ago

Expected behavior

I am using MYSQL database for Bentobox and everything else is loading except for SkyGrid.

Observed/Actual behavior

[11:36:16 ERROR]: [BentoBox] Skipping SkyGrid due to an unhandled exception...
[11:36:16 ERROR]: [BentoBox] java.lang.ClassCastException: class com.google.common.base.Absent cannot be cast to class java.lang.String (com.google.common.base.Absent is in unnamed module of loader java.net.URLClassLoader @5ce65a89; java.lang.String is in module java.base of loader 'bootstrap')
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.database.yaml.YamlDatabaseHandler.serializeMap(YamlDatabaseHandler.java:451)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.database.yaml.YamlDatabaseHandler.saveObject(YamlDatabaseHandler.java:405)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.api.configuration.Config.saveConfigObject(Config.java:92)
        at SkyGrid-2.0.0-SNAPSHOT-b426.jar//world.bentobox.skygrid.SkyGrid.saveWorldSettings(SkyGrid.java:133)
        at SkyGrid-2.0.0-SNAPSHOT-b426.jar//world.bentobox.skygrid.SkyGrid.loadSettings(SkyGrid.java:52)
        at SkyGrid-2.0.0-SNAPSHOT-b426.jar//world.bentobox.skygrid.SkyGrid.onLoad(SkyGrid.java:41)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.managers.AddonsManager.initializeAddon(AddonsManager.java:246)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.managers.AddonsManager.loadAddon(AddonsManager.java:191)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.managers.AddonsManager.loadAddons(AddonsManager.java:150)
        at BentoBox-2.0.1-SNAPSHOT-b2550.jar//world.bentobox.bentobox.BentoBox.onEnable(BentoBox.java:170)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188)
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
        at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:274)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1131)
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
        at java.base/java.lang.Thread.run(Thread.java:840)

Steps/models to reproduce

connect to sql database, put skygrid in bentobox addons folder, skygrid complains about a YAML error.

BentoBox version

image image

Plugin list

image

Other

am using paperMC 1.20.4, my world is attached to a Velocity proxy.

tastybento commented 9 months ago

The error does not seem to be related to MySQL but it is related to the ability to save the SkyGrid config.yml settings. That is failing for some uncaught reason. Could you share your config.yml file? You can zip it and drag and drop it into a reply.

Here's my setup by the way - MariaDB but it's basically the same as MySQL:

> bbox v
[18:38:15 INFO]: Running PAPER 1.20.4.
[18:38:15 INFO]: (git-Paper-408 (MC: 1.20.4))
[18:38:15 INFO]: BentoBox version: 2.0.1-SNAPSHOT-LOCAL
[18:38:15 INFO]: Database: MARIADB
[18:38:15 INFO]: Loaded Game Worlds:
[18:38:15 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, The End
[18:38:15 INFO]: oneblock_world (OneBlock): Overworld, Nether*, The End*
[18:38:15 INFO]: skygrid-world (SkyGrid): Overworld, Nether, The End
[18:38:15 INFO]: Loaded Addons:
[18:38:15 INFO]: AOneBlock 1.15.1-SNAPSHOT-LOCAL (ENABLED)
[18:38:15 INFO]: Border 4.2.1 (ENABLED)
[18:38:15 INFO]: BSkyBlock 1.17.1 (ENABLED)
[18:38:15 INFO]: ControlPanel 1.13.1 (ENABLED)
[18:38:15 INFO]: ExtraMobs 1.13-SNAPSHOT-b23 (ENABLED)
[18:38:15 INFO]: Level 2.12.1-SNAPSHOT-LOCAL (ENABLED)
[18:38:15 INFO]: SkyGrid 2.0.0-SNAPSHOT-b426 (ENABLED)
[18:38:15 INFO]: Upgrades 0.3.0-SNAPSHOT-b133 (ENABLED)
[18:38:15 INFO]: Warps 1.14.1-SNAPSHOT-LOCAL (ENABLED)
tastybento commented 9 months ago

I added some code to BentoBox to log a warning if this happens rather than error. I'd be interested to see your config file and also what the warning says in the console with the latest BentoBox build (ci.bentobox.world) after it's built in a few minutes.