cherry-picked 58a115bf60e from minnymin3
Added inGameOnly option to command
Added length and getArgs(int i) to CommandArgs