-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Command implementation - part I #2430
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dualspiral
requested review from
Faithcaio,
gabizou and
kashike
as code owners
December 4, 2019 22:19
dualspiral
force-pushed
the
api8/commands2
branch
2 times, most recently
from
December 15, 2019 17:08
6317710
to
c2a8970
Compare
dualspiral
force-pushed
the
api8/commands2
branch
from
December 30, 2019 13:54
093cc2a
to
6b69f18
Compare
i509VCB
reviewed
Jan 1, 2020
src/main/java/org/spongepowered/common/mixin/core/brigadier/tree/CommandNodeMixin.java
Outdated
Show resolved
Hide resolved
dualspiral
force-pushed
the
api8/commands2
branch
from
March 1, 2020 14:55
3945852
to
4927a48
Compare
dualspiral
force-pushed
the
api8/commands2
branch
2 times, most recently
from
April 3, 2020 18:24
bf6d638
to
48d2758
Compare
dualspiral
force-pushed
the
api8/commands2
branch
3 times, most recently
from
May 23, 2020 11:40
23975a9
to
d84d8a7
Compare
dualspiral
force-pushed
the
api8/commands2
branch
from
June 5, 2020 17:05
f6f8fb6
to
53a8531
Compare
dualspiral
force-pushed
the
api8/commands2
branch
from
June 13, 2020 12:26
53a8531
to
dfec589
Compare
dualspiral
force-pushed
the
api8/commands2
branch
2 times, most recently
from
June 26, 2020 10:54
bf66ca6
to
94b3c0a
Compare
dualspiral
force-pushed
the
api8/commands2
branch
2 times, most recently
from
July 3, 2020 19:09
4434aac
to
f7eeb0b
Compare
dualspiral
force-pushed
the
api8/commands2
branch
11 times, most recently
from
July 10, 2020 21:02
4ccaa79
to
f7613c7
Compare
dualspiral
force-pushed
the
api8/commands2
branch
from
July 11, 2020 12:54
0bb160c
to
3b1b965
Compare
There are a couple of things we do to sit within Brig, the big one is where we add our command context to the String Reader. We do this to allow us to pass the context to parsers without mixins and further headaches with trying to make things painless for mods that use Brig directly. This isn't complete, but it's a good way to what we're expecting. Registrars and parsers will come last. Impl for CommandTreeBuilders Currently missing the actual translation into Json - that's later Add final modifiers, CommandCause is now a Subject and MessageReceiever. Add interface to get CommandSources from the Cause easily. Adding the CommandTreeBuilder scaffolding for custom frameworks Once this is done, it's on to our own framework More supporting code to enable Brig support. Mostly need to do the grunt work - support our parameters now. Starting to write class that builds the brig tree. Starting complex parameters and how they will translate to the command tree Add ClientCompletionType
dualspiral
force-pushed
the
api8/commands2
branch
from
July 11, 2020 17:52
bb79587
to
c1a6063
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After much deliberation, I've started gluing our system to Brigadier. I wasn't originally going to do so, just sending packets to emulate the client completion, but sitting and thinking about how we can
abuse it meant that I could come up with a couple of clever ways to do so.We will create a Sponge specific Brigadier tree that will acceptWe'll mix inCommandCause
.CommandCause
intoCommandSource
. Under the hood, this will be aICommandSource
and (crucially)ISuggestionProvider
- which will allow us to send completions to the client with minimal fuss.There are a couple of things we do to sit within Brig, the big one is where we add our command context to the String Reader. We do this to allow us to pass the context to parsers without mixins and further headaches with trying to make things painless for mods that use Brig directly.
The logic putting the nodes together hasn't been written yet. I expect a lot of fun when it comes to creating "optional" nodes.
This isn't complete and so won't work as is, but it's a good way to what we're expecting.
Custom registrars and parsers, along with suggestion providing for external frameworks, will come later.This PR, then, is to get it checked over by @Zidane for compliance with the standards we wish to adopt. I think I got them all, but a good check would not go amiss before merging.