Closed mcqwy closed 4 years ago
If the command cannot be executed in a thread, you can try to add problem handling to a thread in the command execution method. And inform the player, please wait a moment, is executing. Then let the thread judge the problem
What you ask for makes no sense. I imagine you’re actually talking about tab completion, but as you haven’t followed the template and I am sure there are already issues open to do with this, closing.
Hello, You say it's meaningless, but how to solve problems like this?
Now I have only two players on my server, And I set the server 6G running memory. Throwing will cause a delay when you type this command. I'm worried that in the future, if the players are getting too many, there will be a delay of several seconds in entering this command?
You say it's meaningless
I said no such thing. I said what you said made no sense, that is, this issue doesn't make sense. I guess is from a language barrier. I tried to correct for it, but ultimately it seems to me that, from reading https://forums.spongepowered.org/t/how-to-make-the-commands-of-other-plug-ins-run-in-my-own-multithreading-environment/37555, you don't understand why I can't do this/ that you just don't understand why I cann't do as you ask.
Simply put: I CANNOT run things like /invsee
or /tp
on a different thread. It is very important that you get this: Sponge does NOT allow for anything that interacts with the game engine to run off thread. End of. No threading can be done with these things.
I have yet to investigate the command element that seems to be slow. I have had no time. There are issues open for it. But please don't tell me I say things are meaningless and such sort without understanding this yourself.
OK, I see!
Sorry, my native language is not English. I hope you can understand it.
I mean input /invsee [playername]
.
playername
= a player that doesn't exist at all
For example:
/tp
/invsee
More orders.... Commands involving offline players or non-existent players. The server will be stuck.