Commit Graph

14 Commits

Author SHA1 Message Date
2d86b1b40d Fixed and cleaned up CommandContext.
- Removed all the inefficient removePortionOfArray stuff and replaced it by ArrayLists that accumulate content instead.
- Added new tests
- Swapped the arguments to assertEquals everywhere. First argument is "expected".
- Fixed warnings in the test case
- I put my original flag parser back and added support for putting flags anywhere. Looks and works better than that undocumented mindfuck zml put there.
2011-09-19 23:14:49 +02:00
1a6bc6f42c Fixed AIOOBE and a missing return, removed an unused and ambiguous method from CommandContext. 2011-09-18 19:11:05 -04:00
56fd654eed Fixed bug with unclosed quotes 2011-09-17 21:10:55 -07:00
19eedecdaf Re-re-introduced a small optimization in the flag parser. 2011-09-16 02:16:11 +02:00
75e843b965 Some small improvements to value flags, and a unit test. 2011-09-14 17:59:18 -07:00
6cdfd86f0b CommandContext:
- Adjusted comment of CommandContext(String[] args, Set<Character> valueFlags) to reflect the actual semantics
- Optimized several parts of the parser (still not happy with the frequent reallocations inside removePortionOfArray)
- Someone (unintentionally?) forgot to break if a non-flag argument was found. If this was indeed intended behaviour, just change the "break;" in line 83 to "continue;".
- Reduced the number of nested control structures a bit.
2011-09-14 18:56:42 +02:00
2f390e9938 Added multiword args and some improvements to value flags. 2011-09-13 22:47:17 -07:00
04dd21d51a Added merging of quoted multiword strings (single or double quotes) into one index, flags can be anywhere in the command args string. Untested and currently unused command aliasing added for moving commands around 2011-08-28 13:00:00 -07:00
447de4b206 - CommandContext's valueFlag constructor will now ignore the 0th element of args (no idea why that is even there)
- Limited flags to a-zA-Z
- Passing null to the valueFlag constructor will disable flag parsing altogether
- Adjusted the error message
- Added javadoc to CommandContext(String[], Set<Character>)
- Added CommandContext(String, Set<Character>)
2011-08-27 16:12:49 +02:00
799b84622f Added support for value flags to CommandContext. 2011-08-26 18:40:51 +02:00
66dcc99809 fixed superpickaxe for gravel & lightstone, preprocessors faster than postprocessors, added methods so same-type changes are visble client-side, fixed fixliquid & setblocks block count 2011-07-15 02:00:48 -05:00
5755755c15 Code cleanup. 2011-05-01 17:06:18 -07:00
d8288afe04 Removed redundant code. 2011-05-01 16:16:50 -07:00
582b98dad0 More file moving. 2011-05-01 01:30:33 -07:00