Jarada / WuufusWaygates

Spigot Plugin: Wuufu's Waygates is a gate plugin inspired by Creative Gates and Stargate that allows players to connect gates into networks using any material and without any commands
https://www.spigotmc.org/resources/wuufus-waygates.80094/
GNU General Public License v3.0
8 stars 4 forks source link

1.18.2 Not working #12

Closed Wholy closed 2 years ago

Wholy commented 2 years ago

[WuufusWaygates] Enabling WuufusWaygates v1.3.4 [18:01:09] [Server thread/ERROR]: Error occurred while enabling WuufusWaygates v1.3.4 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "com.github.jarada.waygates.data.Gate.getBlocks()" is null at com.github.jarada.waygates.WaygateManager.addToGates(WaygateManager.java:70) ~[?:?] at com.github.jarada.waygates.WaygateManager.recordGate(WaygateManager.java:113) ~[?:?] at com.github.jarada.waygates.WaygateManager.loadGates(WaygateManager.java:145) ~[?:?] at com.github.jarada.waygates.data.DataManager.loadWaygates(DataManager.java:357) ~[?:?] at com.github.jarada.waygates.PluginMain.onEnable(PluginMain.java:36) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:518) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:432) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:612) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:263) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1007) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a] at java.lang.Thread.run(Thread.java:833) [?:?]

Jarada commented 2 years ago

Hi there,

This usually occurs when the plugin is unable to find a world that one of your gates is part of because you have removed the world and not the gates inside it.

Can you make sure that, inside the WuufuWaygates plugin folder, that the worlds folder only contains valid worlds that are currently active on your server.

Wholy commented 2 years ago

OK, I had removed the folder, and it works. Thank you :D

Jarada commented 2 years ago

Great to hear! I'm going to leave this issue open for the purpose of adding code to safely deal with this error without the plugin failing.

jaytality commented 2 years ago

Hi @Jarada -- this bug actually occurs again if you use a plugin like Multiworld - your gateways plugin loads in BEFORE the MW plugin loads all the active worlds so it hits that issue you've highlighted above