public CommandContext(CommandSender sender, Command cmd, String alias, String[] theargs, ACommand annot_) {
		this.sender = sender;
		this.command = cmd;
		this.alias = alias;
		this.originalArgs = theargs;
		this.annot = annot_;
		this.flags = new HashSet<String>();
		
		ArrayList<String> argv = new ArrayList<String>();
		for(int i=0; i<theargs.length; i++) {
			String tt = theargs[i];
			if (tt.charAt(0) == '-' && tt.length() == 2) {
				char flagChar = tt.charAt(1);
				if (annot.flags().indexOf(flagChar) == -1) {
					throw new CommandException("Unknown flag -" + flagChar);
				} else {
					flags.add(tt);
				}
			} else {
				argv.add(tt);
			}
		}
		args = new String[argv.size()];
		argv.toArray(args);
		if (args.length < annot.min()) {
			throw new CommandException("Too few arguments");
		}
		if (annot.max() != 0 && args.length > annot.max()) {
			throw new CommandException("Too many arguments");
		}
	}