Skip to content
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

Add commands.complete() #468

Open
wants to merge 3 commits into
base: master
from
Open

Add commands.complete() #468

wants to merge 3 commits into from

Conversation

@JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Sep 26, 2017

This function complete a Command like the Chat. e.g. commands.complete("time ") will return the table {"set","add","query"}.

Another Usage of this function is getting information from MC. e.g. commands.complete("playsound ") will return a list of all available sounds and commands.complete("setblock ~ ~ ~ ") will return a list of all blocks.

This function complete a Command like the Chat. e.g. commands.complete("time ") will return the table {"set","add","query"}. 

Another Usage of this function is getting information from MC. e.g. commands.complete("playsound ") will return a list of all available sounds and commands.complete("setblock ~ ~ ~  ") will return a list of all blocks.
@SquidDev
Copy link
Contributor

@SquidDev SquidDev commented Sep 26, 2017

Whilst this'd be a really neat feature to have, I'm slightly worried about thread safety. The completion generator will need to run on the server thread, so we'll probably want complete and completeAsync variants.

However, this'd then make it unusable as a completion provider to read as it'd introduce a delay in typing. One could probably adjust the completion provider to rus in parallel to reduce the latency, but I'm not sure how much it's worth it.

@thatcraniumguy
Copy link

@thatcraniumguy thatcraniumguy commented May 23, 2018

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.