parent
7ee5fc9b40
commit
a596310693
|
@ -61,7 +61,7 @@ public class CommandParse {
|
||||||
return new CommandParse(method.getParameterTypes(), method.getParameterAnnotations(), method.getReturnType().equals(boolean.class));
|
return new CommandParse(method.getParameterTypes(), method.getParameterAnnotations(), method.getReturnType().equals(boolean.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerParse(Class clazz, Parse parse) {
|
public static void register(Class clazz, Parse parse) {
|
||||||
allparses.put(clazz, parse);
|
allparses.put(clazz, parse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,9 +241,6 @@ public class CommandParse {
|
||||||
|
|
||||||
public StringParse() {
|
public StringParse() {
|
||||||
allparses.put(String.class, this);
|
allparses.put(String.class, this);
|
||||||
if (attrs.containsKey("option")) {
|
|
||||||
options = Arrays.asList(attrs.get("option").split(","));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -256,5 +253,13 @@ public class CommandParse {
|
||||||
}
|
}
|
||||||
return arg;
|
return arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Parse<String> parseAnnotation(Annotation[] annotations) {
|
||||||
|
if (attrs.containsKey("option")) {
|
||||||
|
options = Arrays.asList(attrs.get("option").split(","));
|
||||||
|
}
|
||||||
|
return super.parseAnnotation(annotations);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue