New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new high-level command API #1400
Conversation
a9c3c8f
to
f13829f
Compare
f13829f
to
7b499a9
Compare
Just if you need it: For Minebot I needed a lot of commands. This is why I wrote my own command parser. Parsing is done by the
This automatically adds the help text for the command with the parameter description. Tab complete is fully supported. Parameter types can be blocks, enums, strings, numbers, BlockPos. It is could be made easy to add a new parameter type by using a class instead of an enum constant. (currently licensed under GPL, but I have no problem with re-licensing my parts under MIT) |
7b499a9
to
e1de803
Compare
If you can, when you update the implementation with bleeding, provide a test plugin to make some examples of how things would look with the API changes. I think it would suit better with the description overall. |
Okie doke, will do. |
06281de
to
6a25e84
Compare
bebb424
to
9aa902d
Compare
This enables #1463 right? |
Yes. |
@dualspiral Making all of our dreams come true. |
it's finally happening! |
@@ -116,7 +116,7 @@ static void reportTimings(CommandSource sender) { | |||
.add("maxmem", runtime.maxMemory()) | |||
.add("cpu", runtime.availableProcessors()) | |||
.add("runtime", ManagementFactory.getRuntimeMXBean().getUptime()) | |||
.add("flags", RUNTIME_FLAG_JOINER.join(runtimeBean.getInputArguments())) | |||
.add("setFlags", RUNTIME_FLAG_JOINER.join(runtimeBean.getInputArguments())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
} | ||
|
||
private ArgumentParseException createValueError() { | ||
return createError(t("Short setFlags that are not at the end of a group cannot have a value.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be flags, not setFlags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll get this right one day...
47a7c7c
to
8daa1e8
Compare
6d1d6c3
to
370919c
Compare
61062d5
to
4044530
Compare
4c0b09b
to
d49591a
Compare
d49591a
to
2f79961
Compare
2f79961
to
7210169
Compare
4e9e595
to
7b9980c
Compare
* Make commands accept a cause * Update test plugins * Add parameters from SpongePowered/SpongeAPI#1605 * Add colour parameter
7b9980c
to
aee097f
Compare
Closed in favour of SpongePowered/SpongeAPI#1958 for 1.13 |
Sponge API | SpongeCommon | SpongeForge
This now works - see API PR for more description.