How do I do that, 1 second is waited. I believe 1 sec = 20 ticks. Is that correct?
Example:
p.sendMessage ("§a [SCMD +] Show information from the server.");
// WAITED FUNCTION
p.sendMessage ("Bukkit>" + Bukkit.getVersion ());
// WAITED FUNCTION
p.sendMessage ("Name>" + Bukkit.getServerName ());
// WAITED FUNCTION
p.sendMessage ("ID>" + Bukkit.getServerId ());
// WAITED FUNCTION
p.sendMessage ("IP>" + Bukkit.getIp ());
// WAITED FUNCTION
p.sendMessage ("Port>" + Bukkit.getPort ());
Yes, but of course JavaSESE has its own time tracking, delay and scheduling methods.
Thanks for the answer.
What are those methods. So how do I use this on "// wait function"?
You have to use a scheduler from Bukkit, if you have TS or similar, I also like to help you.
For example, read https://docs.oracle.com/...hread.html here
But putting in delays in an event is a bad idea in some frameworks.
I once saw someone
Thread.sleep (2000);
But that does not hit the thread, and I do not want that.
Unfortunately, my microphone is not working right now. But thanks for your answer
What do you think, what that means?
I do not care. I'll have a look. I'm only aware of what that does.
Just read the APIdoc.
I just do not get it and I'll fall asleep right away. Could you give me the order quickly? I searched the net everywhere.
Just tell me what's there. I do not want to stop the thread so I want solage the timeout or delay laueft what chat can write.
p.sendMessage ("IP>" + Bukkit.getIp ());
// WAITED FUNCTION
p.sendMessage ("Port>" + Bukkit.getPort ());
Bukkit.getScheduler (). RunTaskLater (Bukkit.getPluginManager (). GetPlugin ("DeinPluginName"), () → {
// Here the delayed code must be pure
}, 20L);