andrei1058 / BedWars1058

A minecraft minigame where you have to defend your bed and destroy the others. Once your bed is destroyed, you cannot respawn.
GNU General Public License v3.0
278 stars 220 forks source link

Connection to server throwing NPE #531

Open coeragames opened 2 years ago

coeragames commented 2 years ago

Describe the bug When I try connecting to my Bedwars server, a NPE exception is thrown.

To Reproduce Steps to reproduce the behavior: Install Bedwars1058 plugin on a server, create an arena & configure the plugin. Then, try connecting to the server

Expected behavior This is an unexpected error

Screenshots

System (please complete the following information):

Additional context Here is the thrown error: [10:06:48] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to BedWars1058 v22.3.4 org.bukkit.event.EventException: null at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-79a30d7-f4830a1] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-79a30d7-f4830a1] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [server.jar:git-Spigot-79a30d7-f4830a1] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.PlayerList.onPlayerJoin(PlayerList.java:346) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.PlayerList.a(PlayerList.java:166) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.LoginListener.b(LoginListener.java:159) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.LoginListener.e(LoginListener.java:57) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:233) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:140) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:845) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [server.jar:git-Spigot-79a30d7-f4830a1] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [server.jar:git-Spigot-79a30d7-f4830a1] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] Caused by: java.lang.NullPointerException at com.andrei1058.bedwars.configuration.LevelsConfig.getLevelName(LevelsConfig.java:80) ~[?:?] at com.andrei1058.bedwars.levels.internal.PlayerLevel.setLevelName(PlayerLevel.java:74) ~[?:?] at com.andrei1058.bedwars.levels.internal.PlayerLevel.<init>(PlayerLevel.java:58) ~[?:?] at com.andrei1058.bedwars.levels.internal.LevelListeners.onPlayerJoin(LevelListeners.java:56) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[server.jar:git-Spigot-79a30d7-f4830a1] ... 14 more

andrei1058 commented 2 years ago

It looks like there is something wrong with your existing level configuration