Executing a registered command functions, but still returns UnhandledException
LadyCailinBot opened this issue ยท 1 comments
CMDHELPER-3121 - Reported by bunnies1230
Executing the command prints out all of the correct information, but follows it with an internal exception error in-chat and in-console.
I am running the latest 1.8.8 spigot build, but it reads below 1.8.0 several times. Am I misinterpreting that? Did I install the new jar incorrectly to cause
register_command('player', array(
description: 'Displays information about yourself or another player',
permission: 'server.goblin',
noPermMsg: color(c).'You must be a server member to use this command',
usage: color(gray).' Usage:'.color(aqua).' /player info [player]',
aliases: array('players'),
executor: closure(@al, @p, @args, @cmd,
if(@args[1] == '?') {
msg(color(gray),' Usage:',color(aqua),' /player info [player]')
msg(color(gray),' - Displays information about yourself or another player')
execute(closure(die()))
}
@p = player()
@tag = concat(color(white),'[',color(yellow),'RPG',color(white),'] ')
@tagGlobal = concat(color(white),'[',color(red),'RPG Global',color(white),'] ')
include('includes/rpg_functions.ms')
@kingdoms = _kingdoms()
@governments = _governments()
if(@args[0] == 'info'){
if(@args[1] == ''){
@player = player()
}else{
@player = _nameCheck(@args[1])
}
if(@player == false){
if(get_value('players.' . puuid(@args[1],True). '.laston.data') == null){
msg(@tag,color(red),@args[1],color(gray),' has not joined this server')
execute(closure(die()))
}
}
@name = _pinfo(@player,'name')
@kingdom = _pinfo(@player,'kingdom')
@position = _pinfo(@player,'position')
@title = _pinfo(@player,'title')
@joined = _pinfo(@player,'joined')
@laston = _pinfo(@player,'laston')
@infamy = _pinfo(@player,'infamy')
msg(color(gray),'======= ',color(yellow),'Player',color(gray),' - ',color(aqua),@name,color(gray),' =======')
if(@kingdom == null){
msg(color(yellow),' Kingdom: ',color(white),'None')
}else{
msg(color(yellow),' Kingdom: ',color(green), @kingdom)
}
if(@kingdom == null){
msg(color(yellow),' Position: ',color(white),'Peasant')
}else if(@position == null){
msg(color(yellow),' Position: ',color(green),'Citizen')
}else{
msg(color(yellow),' Position: ',color(gold), @position)
}
if(@title == null){
msg(color(yellow),' Title: ',color(red),'n/a')
}else{
msg(color(yellow),' Title: ',color(white), @title)
}
msg(color(yellow),' Balance: ',color(aqua),acc_balance(@name),' Rupees')
if(@infamy == null){
msg(color(yellow),' Infamy: ',color(white),'0')
}else{
if(@infamy >= 33){
@color = 'red'
}else if(@infamy >= -33){
@color = 'white'
}else if(@infamy < -33){
@color = 'green'
}
msg(color(yellow),' Infamy: ',color(@color), @infamy)
}
if(ponline(@player)){
msg(color(yellow),' Last On: ',color(green),'Online')
}else if(@laston == null){
msg(color(yellow),' Last On: ',color(red),'n/a')
}else{
msg(color(yellow),' Last On: ',color(blue), @laston)
}
execute(closure(die()))
}else{
msg(color(gray),'======= ',color(yellow),'Command Help',color(gray),' - ',color(aqua),'/player',color(gray),' =======')
msg(' /player info [player]')
msg(color(yellow),' Type ',color(aqua),'/player [cmd] ?',color(yellow),' for more information about a command')
execute(closure(die()))
}
),
tabcompleter: closure(@al, @p, @args, @cmd,
@players = all_players()
if(array_size(@args) == 2) {
@c = to_lower(@args[1])
@returnable = array()
foreach(@p in @players){
@len = length(@c)
@pTest = to_lower(substr(@p,0,@len))
if(@pTest == @c) {
array_push(@returnable, @p)
}
}
return(@returnable)
} else {
return(array())
}
)
))
[22:44:07] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'player' in plugin CommandHelper v3.3.2-SNAPSHOT.3045-
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-db6de12-039621d]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-db6de12-039621d]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-db6de12-039621d]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_31]
at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-039621d]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-db6de12-039621d]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_31]
Caused by: java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102) ~[?:1.8.0_31]
at java.util.Stack.pop(Stack.java:84) ~[?:1.8.0_31]
at com.laytonsmith.core.exceptions.StackTraceManager.popStackTraceElement(StackTraceManager.java:35) ~[?:?]
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:218) ~[?:?]
at com.laytonsmith.abstraction.bukkit.BukkitMCCommand.handleCustomCommand(BukkitMCCommand.java:259) ~[?:?]
at com.laytonsmith.commandhelper.CommandHelperPlugin.onCommand(CommandHelperPlugin.java:590) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-db6de12-039621d]
... 15 more
Comment by PseudoKnight
Good news. This was fixed in build 3066.
http://builds.enginehub.org/job/commandhelper/8509