Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to send an "infinite" popup?

Comments in 'Plugin Development' started by HotFireyDeath, Jun 20, 2015.

  1. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
    How would you send an "infinite" popup (one that stays there) without freezing the code?

    I used this:
    Code:
    while(1){
       $sender->sendPopup($msg);
    }
    
    but it freezes the server completely. How can you make a popup stay without freezing everything up?
  2. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    Make a scheduledrepeatingtask. And make the ticks 7.
    HotFireyDeath, xiaoq and BalAnce like this.
  3. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    Well the lowest you could go is 10 but not that big of difference.
  4. xiaoq
    Offline

    xiaoq Active Member

    Joined:
    Dec 23, 2014
    Posts:
    232
    Minecraft User:
    xiaoq
    The popup will show and hide if set to 10
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The ticks should be the server TPS since the client shows the popup for one second, which by standard should be 20 ticks. However, there may be unexpected lag. Nevertheless, the flashing effect emphasizes the popup as well :)
    HotFireyDeath likes this.

Share This Page

Advertisement