ScreamingSandals/BedWars

[Bug]: Bedwars plugin not loading correctly.

yPedroDev opened this issue · 7 comments

Bug description

Hello, like yesterday I created a new solo bedwars arena and everything was fine, today when I used bw reload this error occurred:
[12:49:48 WARN]: [BedWars] Something went wrong while loading arena file 31fc742e-3ddc-4ba9-bf2a-0d85cfbeece8.yml. Please report this to our Discord or GitHub!
[12:49:48 WARN]: java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "" is null
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.utils.MiscUtils.convertColorToNewFormat(MiscUtils.java:228)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.game.Game.loadGame(Game.java:1034)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.game.Game.loadGame(Game.java:937)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.Main.onEnable(Main.java:548)
[12:49:48 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288)
[12:49:48 WARN]: at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202)
[12:49:48 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109)
[12:49:48 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.commands.ReloadCommand$1.run(ReloadCommand.java:124)
[12:49:48 WARN]: at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101)
[12:49:48 WARN]: at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1734)
[12:49:48 WARN]: at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:503)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1606)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1260)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326)
[12:49:48 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)

How would I fix this? :/

I don't want to keep deleting every time this happens, that would be annoying.

BedWars dump

https://paste.gg/p/anonymous/ae262065d948482bbd5b382949df6674

Console log

[12:49:48 WARN]: [BedWars] Something went wrong while loading arena file 31fc742e-3ddc-4ba9-bf2a-0d85cfbeece8.yml. Please report this to our Discord or GitHub!
[12:49:48 WARN]: java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "" is null
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.utils.MiscUtils.convertColorToNewFormat(MiscUtils.java:228)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.game.Game.loadGame(Game.java:1034)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.game.Game.loadGame(Game.java:937)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.Main.onEnable(Main.java:548)
[12:49:48 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288)
[12:49:48 WARN]: at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202)
[12:49:48 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109)
[12:49:48 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520)
[12:49:48 WARN]: at BedWars-0.2.32.1.jar//org.screamingsandals.bedwars.commands.ReloadCommand$1.run(ReloadCommand.java:124)
[12:49:48 WARN]: at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101)
[12:49:48 WARN]: at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1734)
[12:49:48 WARN]: at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:503)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1606)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1260)
[12:49:48 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326)
[12:49:48 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)

Additional information

No response

The file in question is missing in the dump, can you send us the 31fc742e-3ddc-4ba9-bf2a-0d85cfbeece8.yml file?

i can't send yml files.

Oh, I see. You have created two teams with dot in their names, namely Sr.Rosinha and Mr.Cinzeiro. What actually happened here is that Bukkit converted it into subsections instead, which resulted in invalid save file being generated
image

Can you try latest version from https://github.com/ScreamingSandals/BedWars/actions/workflows/build-0-2-x.yml? You will then have to fix the file or remake the arena. Dots in team names should be possible now.

Ok i have fixed.

Now loads correctly