Fix bug in useageTemplate and a bug with required args from console.

This commit is contained in:
Magnus Ulf 2015-05-07 21:05:08 +02:00 committed by Olof Larsson
parent 6f8da0a9f8
commit d7fcef6c3d
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ public class ArgSetting
// Is this arg ALWAYS required from the console?
// That might the case if the arg is a player. and default is oneself.
protected boolean requiredFromConsole = false;
public boolean isRequiredFromConsole() { return requiredFromConsole && this.isRequired(); }
public boolean isRequiredFromConsole() { return requiredFromConsole; }
public ArgSetting setRequiredFromConsole(boolean requiredFromConsole) { this.requiredFromConsole = requiredFromConsole; return this; }
// An optional description of this argument.

View File

@ -892,7 +892,7 @@ public class MassiveCommand
public String getUseageTemplate(List<MassiveCommand> commandChain, boolean addDesc, boolean onlyFirstAlias)
{
return getUseageTemplate(commandChain, addDesc, onlyFirstAlias, null);
return getUseageTemplate(commandChain, addDesc, onlyFirstAlias, sender);
}
public String getUseageTemplate(List<MassiveCommand> commandChain, boolean addDesc)