You need to create a new delayed task/event for this.
|
|
Hello, I'm using PI source and right now I have this code:
if (itemId == 1779 && objectId == 7849) {
try
{
Thread.currentThread().sleep(2000);
}
catch(InterruptedException ex)
{
Thread.currentThread().interrupt();
}
c.sendMessage("test");
}
I want it to do this "c.sendMessage("test");" after 2 seconds, only problem with my code is that the whole server stops for 2 seconds, I just want the code to be delayed by 2 seconds.

You need to create a new delayed task/event for this.




yes the whole server stops because ur stopping the main thread


| « OSBrutality right click function broken/bugged. | Task keeps going [Ruse/Necrotic base] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |