Added forgotten type adapters.

This commit is contained in:
Olof Larsson
2011-10-10 14:21:22 +02:00
parent 1d44aa0c9c
commit 80d132af70
6 changed files with 16 additions and 123 deletions

View File

@ -32,6 +32,7 @@ public abstract class MCommand<T extends MPlugin>
// Information on the args
public List<String> requiredArgs;
public LinkedHashMap<String, String> optionalArgs;
public boolean errorOnToManyArgs = true;
// FIELD: Help Short
// This field may be left blank and will in such case be loaded from the permissions node instead.
@ -198,7 +199,7 @@ public abstract class MCommand<T extends MPlugin>
return false;
}
if (args.size() > this.requiredArgs.size() + this.optionalArgs.size())
if (args.size() > this.requiredArgs.size() + this.optionalArgs.size() && this.errorOnToManyArgs)
{
if (sender != null)
{