Minor fix and additon

This commit is contained in:
Norbi Peti 2016-11-03 16:28:16 +01:00
parent d2a302061f
commit 398912353b

View file

@ -28,7 +28,8 @@ public class CommandCaller implements CommandExecutor {
{ {
PluginCommand pc = ((JavaPlugin) c.getPlugin()).getCommand(c.GetCommandPath()); PluginCommand pc = ((JavaPlugin) c.getPlugin()).getCommand(c.GetCommandPath());
if (pc == null) if (pc == null)
new Exception("Can't find top-level command: " + c.GetCommandPath()).printStackTrace(); new Exception("Can't find top-level command: " + c.GetCommandPath() + " for plugin: "
+ c.getPlugin().getName()).printStackTrace();
else else
pc.setExecutor(instance); pc.setExecutor(instance);
} }
@ -66,8 +67,8 @@ public class CommandCaller implements CommandExecutor {
if (!cmd.OnCommand(sender, alias, cmdargs)) if (!cmd.OnCommand(sender, alias, cmdargs))
sender.sendMessage(cmd.GetHelpText(alias)); sender.sendMessage(cmd.GetHelpText(alias));
} catch (Exception e) { } catch (Exception e) {
TBMCCoreAPI.SendException( TBMCCoreAPI.SendException("Failed to execute command /" + cmd.GetCommandPath() + " with arguments "
"Failed to execute command " + cmd.GetCommandPath() + " with arguments " + cmdargs, e); + Arrays.toString(cmdargs), e);
} }
return true; return true;
} }