Commit graph

48 commits

Author SHA1 Message Date
Nathan Adams
bafe8e6b56 Made getArgument return the actual value, not a container object 2017-06-28 10:55:56 +02:00
Nathan Adams
8e3b29d22e Split ParsedArgument into fixed or dynamic, added copy methods for caching contexts 2017-06-28 10:54:10 +02:00
Nathan Adams
3946b084a0 Commands should return an int success count 2017-06-27 15:34:42 +02:00
Nathan Adams
73015f87d2 Typo! 2017-06-27 13:08:39 +02:00
Nathan Adams
6575257e0d Implemented permissions (predicate on each node) 2017-06-26 14:49:55 +02:00
Nathan Adams
014caa2905 Pass S (source type, was sometimes T) through to all nodes, so Command can have source type 2017-06-26 09:44:29 +02:00
Nathan Adams
f0f038b57a Quote string replacements to avoid pattern issues 2017-06-22 09:35:33 +02:00
Nathan Adams
7ac8998e5a Removed dependency on lang3 2017-06-22 09:34:30 +02:00
Nathan Adams
f372eb3b98 Added support for suggestions tabcompletions of a command input 2017-06-22 09:05:16 +02:00
Nathan Adams
eba88b2773 More cleanup 2017-06-21 14:36:17 +02:00
Nathan Adams
c2141ce38b Code cleanup 2017-06-21 14:29:26 +02:00
Nathan Adams
400657b472 Removed findbugs jsr 2017-06-21 14:25:36 +02:00
Nathan Adams
e12ab0b6d8 Updated libraries 2017-06-21 14:21:15 +02:00
Nathan Adams
a4dca40ffb Added gradle wrapper and updated to gradle 4 2017-06-21 14:11:41 +02:00
Nathan Adams
b6b684efc7 Extracted some hardcoded strings to constants 2014-10-13 12:18:42 +02:00
Nathan Adams
91559191b6 Added simple usage generation 2014-10-09 12:15:54 +02:00
Nathan Adams
b3703db535 Changed tests to ensure exceptions are of right type & right details 2014-10-03 12:45:19 +02:00
Nathan Adams
ef4199e824 Renamed project to 'Brigadier' 2014-10-02 13:00:29 +02:00
Nathan Adams
8c5338a6bd Start of new exception system 2014-10-02 12:58:18 +02:00
Nathan Adams
29f99e8710 Implemented equals for CommandContext and ParsedArgument 2014-09-29 12:35:07 +02:00
Nathan Adams
2114f086cb Added a 'source' for commands that may be passed around in the context 2014-09-29 12:18:40 +02:00
Nathan Adams
6a8d067cf9 Always try every route to find a matching command 2014-09-29 11:56:24 +02:00
Nathan Adams
4b6abf4084 Verify command merging in the dispatcher 2014-09-26 10:39:50 +02:00
Nathan Adams
82b576e38c Implemented merging of CommandNode children 2014-09-25 17:21:26 +02:00
Nathan Adams
d8c9e15a1c Made ArgumentBuilders use a RootCommandNode to hold their arguments 2014-09-25 16:36:45 +02:00
Nathan Adams
5760f94009 Add equality checking to each command node 2014-09-25 16:34:44 +02:00
Nathan Adams
f91bc15e19 Added a nice toString to IntegerArgumentType 2014-09-25 13:25:29 +02:00
Nathan Adams
fb92c2f3c8 Added & tested equals() and hashCode() in IntegerArgumentType 2014-09-25 13:18:11 +02:00
Nathan Adams
5136e3d103 Moved tests to correct location 2014-09-25 13:11:05 +02:00
Nathan Adams
78b9216eb4 Extracted " " into a constant for separating arguments 2014-09-25 10:38:59 +02:00
Nathan Adams
085f5b3d98 Added testParseSimilar testcase to LiteralCommandNode 2014-09-25 10:32:15 +02:00
Nathan Adams
d678a5cb21 Changed how parsing is done, performed by dispatcher and can now look as deep as needed 2014-09-24 17:12:06 +02:00
Nathan Adams
8da6087618 Changed the Runnable to a Command 2014-09-24 14:05:12 +02:00
Nathan Adams
81ed5f0521 Moved CommandArgumentParseResult to its own class 2014-09-24 13:53:23 +02:00
Nathan Adams
20357723df Added command context and the ability to query arguments from it 2014-09-24 13:49:00 +02:00
Nathan Adams
d13587a4df Made every CommandNode support an executor 2014-09-24 12:04:33 +02:00
Nathan Adams
3ef22ef317 Renamed CommandBuilder to LiteralArgumentBuilder 2014-09-24 11:57:12 +02:00
Nathan Adams
9585aaf0b3 Added ArgumentValidationException as separate from illegal syntax 2014-09-24 11:30:13 +02:00
Nathan Adams
0a71730bdc Test for invalid child nodes 2014-09-22 15:34:15 +02:00
Nathan Adams
397ab17e64 When parsing nodes, return the deepest node we went into 2014-09-22 15:20:57 +02:00
Nathan Adams
8d164e4b66 Parse into nested arguments 2014-09-18 16:36:36 +02:00
Nathan Adams
a32243b704 Commands can be parsed, in a very limited way. 2014-09-18 11:48:03 +02:00
Nathan Adams
2b267a26f6 Store commands as nodes and execute them 2014-09-18 10:58:49 +02:00
Nathan Adams
4f20d02a97 Build stuff into nodes! They may not do anything, but it's node-tastic! 2014-09-17 15:30:49 +02:00
Nathan Adams
934ba3336f Added commandbuilder.then() and argumentbuilder 2014-09-17 13:00:41 +02:00
Nathan Adams
dadedbb322 Just use a regular builder 2014-09-16 14:47:19 +02:00
Nathan Adams
c73607ba36 Super simple start 2014-09-16 12:08:15 +02:00
Nathan Adams
4801ab8dc9 Initial commit 2014-09-15 12:19:14 +02:00