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

Popup Keep

Comments in 'Plugin Development' started by DevWars, Nov 17, 2015.

  1. DevWars
    Offline

    DevWars Banned

    Joined:
    Nov 7, 2015
    Posts:
    28
    Minecraft User:
    PmServer
    How to Keep the message popup side of the screen to be short, it does not disappear?
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    using a *Task
    PHP:
    //Main file

    $this->getServer()->getScheduler()->scheduleRepeatingTask(new Timer($this), 5);//timer repeats each 5 ticks.
    now CREATE a file called Timer.php and put:
    PHP:
    <?php
    namespace NameSpace;

    use 
    pocketmine\scheduler\PluginTask;

    class 
    Timer extends PluginTask{

    public function 
    __construct($plugin){
    $this->plugin $plugin;
    parent::__construct($plugin);
    }

    public function 
    onRun($tick){
    foreach(
    $this->getOwner()->getOnlinePlayers() as $o){
    $o->sendPoup("I LOVE YOU! WELCOME TO ****");
    }
    }
    }
    Last edited: Nov 17, 2015
  3. DevWars
    Offline

    DevWars Banned

    Joined:
    Nov 7, 2015
    Posts:
    28
    Minecraft User:
    PmServer
    ok show.. how to add PrimedTNTParticles On The Block ?
  4. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    getOnlinePlayers() returns an array , you need to use a foreach to send a popup to each player online
    Jelly9912 likes this.

Share This Page

Advertisement