WG functions throw NPE in main.ms
LadyCailinBot opened this issue ยท 4 comments
CMDHELPER-2746 - Reported by LadyCailin
Reported by 4lphalfa on github.
i tested with sk_all_regions() but i think other sk functions are also affected
world edit, world guard and command helper on newest development build
here the stacktrace i allways get when calling it
update: i tested some more, it only seems to happen when you call them during initialisation in the main.ms, in a binded event it is fine
09:42:09 [SEVERE] Uh oh! You've found an error in CommandHelper. This is an error caused by your code, so you may be able to find a workaround, but is ultimately an error in CommandHelper itself. The line of code that caused the error was this:
sk_all_regions()
on or around /home/max/Desktop/minecraft survival/minecraft/plugins/CommandHelper/main.ms:2.
Please report this error to the developers, and be sure to include the version numbers: Server version: 1.5.2-R0.1-SNAPSHOT; CommandHelper version: 1484-5d963a9. Here's the stacktrace:
java.lang.NullPointerException
at com.laytonsmith.core.functions.WorldEdit$sk_all_regions.exec(WorldEdit.java:506)
at com.laytonsmith.core.Script.eval(Script.java:301)
at com.laytonsmith.core.Script.eval(Script.java:262)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1489)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1454)
at com.laytonsmith.core.AliasCore$LocalPackage.compileMS(AliasCore.java:535)
at com.laytonsmith.core.AliasCore.reload(AliasCore.java:317)
at com.laytonsmith.commandhelper.CommandHelperPlugin.onEnable(CommandHelperPlugin.java:175)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:383)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugin(CraftServer.java:306)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.enablePlugins(CraftServer.java:288)
at net.minecraft.server.v1_5_R3.MinecraftServer.j(MinecraftServer.java:310)
at net.minecraft.server.v1_5_R3.MinecraftServer.e(MinecraftServer.java:289)
at net.minecraft.server.v1_5_R3.MinecraftServer.a(MinecraftServer.java:249)
at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:149)
at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:388)
at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
Comment by Tom.Gebbett
I think it's because the WorldGuard plugin hasn't loaded yet. Put it somewhere that runs after all plugins are loaded.
Comment by jb_aero
Where in main.ms is the code that's running this? I need to know the environment details if I'm to fix this.
Edit: Currently I have console(sk_all_regions()) in main.ms by itself, and no errors are thrown, and the function works as expected.
Edit: I can't get build 1484 to even load.
Comment by PseudoKnight
Ya, it might be due to the build. There were possibly related fixes in the very next build, even. Does this still occur in build 1560, the latest stable build for 1.5?