Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. <?php
  2.  
  3. namespace moch\TopMoneys;
  4.  
  5. use pocketmine\scheduler\Task;
  6.  
  7. class UpdateTask extends Task{
  8.  
  9.     public function __construct(Main $pl){
  10.      $this->pl = $pl;
  11.     }
  12.  
  13.     public function onRun($tick){
  14.      $lb = $this->pl->getLeaderBoard();
  15.      $list = $this->pl->getParticles();
  16.      foreach($list as $particle){
  17.       $particle->setText($lb);
  18.      }
  19.      $lb1 = $this->pl->getLeaderBoard1();
  20.      $list1= $this->pl->getParticles1();
  21.      foreach($list1 as $particle1){
  22.       $particle1->setText($lb1);
  23.       }
  24.      $lb2 = $this->pl->getLeaderBoard2();
  25.      $list2 = $this->pl->getParticles2();
  26.      foreach($list2 as $particle2){
  27.       $particle2->setText($lb2);
  28.       }
  29.       $lb3 = $this->pl->getLeaderBoard3();
  30.      $list3 = $this->pl->getParticles3();
  31.      foreach($list3 as $particle3){
  32.       $particle3->setText($lb3);
  33.       }
  34.       $lb4 = $this->pl->getLeaderBoard4();
  35.      $list4 = $this->pl->getParticles4();
  36.      foreach($list4 as $particle4){
  37.       $particle4->setText($lb4);
  38.       }
  39.       $lb5 = $this->pl->getLeaderBoard5();
  40.      $list5 = $this->pl->getParticles5();
  41.      foreach($list5 as $particle5){
  42.       $particle5->setText($lb5);
  43.       }
  44.     }
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement