Unhandled exception when using die() in a registered command
LadyCailinBot opened this issue ยท 4 comments
CMDHELPER-2906 - Reported by PseudoKnight
register_command('test', array(
'executor': closure(@alias, @sender, @args, @info,
die()
)
))
[03:02:31] [Server thread/INFO]: PseudoKnight issued server command: /test
[03:02:31] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin CommandHelper v3.3.1-SNAPSHOT:2601-68071fd,master
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1312]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:199) ~[spigot.jar:git-Spigot-1312]
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:547) ~[spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:972) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:817) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:65) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java:77) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:698) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:560) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:467) [spigot.jar:git-Spigot-1312]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot.jar:git-Spigot-1312]
Caused by: com.laytonsmith.core.exceptions.CancelCommandException:
at com.laytonsmith.core.functions.Echoes$die.exec(Echoes.java:49) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:332) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1692) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1652) ~[?:?]
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:144) ~[?:?]
at com.laytonsmith.abstraction.bukkit.BukkitMCCommand.handleCustomCommand(BukkitMCCommand.java:239) ~[?:?]
at com.laytonsmith.commandhelper.CommandHelperPlugin.onCommand(CommandHelperPlugin.java:498) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1312]
... 13 more
Comment by jb_aero
I probably should have asked you, what does it do normally in closures?
Comment by PseudoKnight
die('Message')
))```
Stops the script and says "Message".
Comment by jb_aero
I don't have access to a server, can you try
/herp = store_value('example', closure(die('message')))
/derp = execute(get_value('example'))