Fixes
This commit is contained in:
parent
60d35d8eae
commit
596c929ace
2 changed files with 5 additions and 4 deletions
|
@ -95,12 +95,13 @@ public class CommandCaller implements CommandExecutor {
|
|||
sender.sendMessage("§cOnly ingame players can use this command.");
|
||||
return true;
|
||||
}
|
||||
final String[] cmdargs = args.length > 0 ? Arrays.copyOfRange(args, args.length - argc, args.length) : args;
|
||||
try {
|
||||
if (!cmd.OnCommand(sender, alias,
|
||||
(args.length > 0 ? Arrays.copyOfRange(args, args.length - argc, args.length) : args)))
|
||||
if (!cmd.OnCommand(sender, alias, cmdargs))
|
||||
sender.sendMessage(cmd.GetHelpText(alias));
|
||||
} catch (Exception e) {
|
||||
TBMCDiscordAPI.SendException(e, "Failed to execute command " + cmd.GetCommandPath() + " with arguments ");
|
||||
TBMCDiscordAPI.SendException(e,
|
||||
"Failed to execute command " + cmd.GetCommandPath() + " with arguments " + cmdargs);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class UpdatePlugin extends AdminCommandBase {
|
|||
sender.sendMessage("Updating plugin...");
|
||||
String ret = "";
|
||||
if ((ret = TBMCCoreAPI.UpdatePlugin(args[0])).length() > 0) {
|
||||
sender.sendMessage("Internal error: " + ret);
|
||||
sender.sendMessage(ret);
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage("Updating done!");
|
||||
|
|
Loading…
Reference in a new issue