Question Wait for UI to finalize loading

Discussion in 'Developer Support' started by borrie, Feb 16, 2021.

  1. borrie

    Joined:
    Feb 15, 2021
    Messages:
    1
    Likes Received:
    0
    I am creating a world hopper where I scout for other PK'ers. I am querying new players, and see if the result isEmpty or not. Then I'll hop to another world. Here comes the problem. Hopping sometimes takes a few seconds (in extreme cases 10 seconds). After hopping, the Worls.getCurrent(); returns the new world, but the UI hasn't updated yet showing us the players the bot saw before. I am wondering how to wait for the execution to finish.

    I was thinking about Execution.delayUntil however this doesn't seem to work.

    Code (Text):
    1.  
    2. Execution.delaysUntil(() -> WorldHop.hopToRandom(true));
    3.  
     

Share This Page

Loading...