1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Create and use AsyncTask

Discussion in 'Development' started by ethaniccc, Apr 13, 2020.

  1. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    I should probably should not be attempting it, since I don't know much, and I still don't really understand how to do my task with Async even after looking at the test plugin in Pocketmine's GitHub repository.

    I'm using libpmquery to make my entity query a server every second, but it starts to lag the server, making it go to 100% cpu and 0.25 TPS. I want to make an AsyncTask to query the server and give a result, then get the result and put in the NPC's nametag. I don't really need code, I need an explanation on how to do this.

    Thanks in advance!
     
    Last edited: Apr 13, 2020
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.