Commit 8b3c565 1 parent 7f4090b commit 8b3c565 Copy full SHA for 8b3c565
File tree 2 files changed +6
-2
lines changed
main/java/cat/nyaa/nyaacore
test/java/cat/nyaa/nyaacore
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -370,6 +370,10 @@ private Arguments(CommandSender sender) {
370
370
this .sender = sender ;
371
371
}
372
372
373
+ public static Arguments parse (String [] rawArg ) {
374
+ return parse (rawArg , null );
375
+ }
376
+
373
377
public static Arguments parse (String [] rawArg , CommandSender sender ) {
374
378
if (rawArg .length == 0 ) return new Arguments (sender );
375
379
String cmd = rawArg [0 ];
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class ArgumentsTest {
8
8
@ Test
9
9
public void test1 () throws Exception {
10
10
String cmd = "`foo bar` far `bar \\ `foo`" ;
11
- CommandReceiver .Arguments arg = CommandReceiver .Arguments .parse (cmd .split (" " ), null );
11
+ CommandReceiver .Arguments arg = CommandReceiver .Arguments .parse (cmd .split (" " ));
12
12
assertNotNull (arg );
13
13
assertEquals ("foo bar" , arg .nextString ());
14
14
assertEquals ("far" , arg .nextString ());
@@ -34,7 +34,7 @@ public void test2() throws Exception {
34
34
@ Test
35
35
public void test3 () throws Exception {
36
36
String cmd = "t w key:`3` key2:`/co l u:miu_bug` ke3y:`12`" ;
37
- CommandReceiver .Arguments arg = CommandReceiver .Arguments .parse (cmd .split (" " ), null );
37
+ CommandReceiver .Arguments arg = CommandReceiver .Arguments .parse (cmd .split (" " ));
38
38
assertNotNull (arg );
39
39
assertEquals (3 , arg .argInt ("key" ));
40
40
assertEquals ("/co l u:miu_bug" , arg .argString ("key2" ));
You can’t perform that action at this time.
0 commit comments