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

Conversation

Projects
None yet
3 participants
@Wilma456
Contributor

Wilma456 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.

Add commands.complete()
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

This comment has been minimized.

Contributor

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

This comment has been minimized.

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