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

Effect forever

Comments in 'Plugin Development' started by Anonymous4life, Jul 1, 2015.

  1. Anonymous4life
    Offline

    Anonymous4life New Member

    Joined:
    Apr 9, 2015
    Posts:
    26
    Minecraft User:
    Anonymous4life
    is there a way where I can make it so they have like jump boost 2 forever on the whole server?
  2. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    PHP:
    public function onJoin(PlayerJoinEvent $pje) {
            
    $player $pje->getPlayer();
            
    $id 1;
            
    $amplifier 0;
            
    $visibility false;
            
    $duration 50000000000000000;
            
    $effect Effect::getEffect($id);
          
            
    $effect->setVisible($visibility);
            
    $effect->setDuration($duration);
            
    $effect->setAmplifier($amplifier);
            
    $player->addEffect($effect);
        }
    It goes away after death but if you find a way to give it to the player after the PlayerDeathEvent then it should work fine.
    Last edited: Jul 1, 2015
    Legoboy0215 and Bublz_654 like this.
  3. Anonymous4life
    Offline

    Anonymous4life New Member

    Joined:
    Apr 9, 2015
    Posts:
    26
    Minecraft User:
    Anonymous4life
    Ok so I still don't know PhP but how will I put this on my server? Make a zip file... Then what do I put inside the zip?
  4. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    That's not how you do it. You need to learn php & Pocketmine Api so you can make plugins.
    Try using GetInEffects
    TonyDroide, iksaku and Xenturio like this.
  5. Anonymous4life
    Offline

    Anonymous4life New Member

    Joined:
    Apr 9, 2015
    Posts:
    26
    Minecraft User:
    Anonymous4life
    Ok thx :p about to start learning PhP :)
  6. andre_the_gamer
    Offline

    andre_the_gamer Active Member

    Joined:
    Feb 5, 2015
    Posts:
    112
    Minecraft User:
    Andre_The_Gamer
    25 Years later "Dude are done learining PHP"
  7. Anonymous4life
    Offline

    Anonymous4life New Member

    Joined:
    Apr 9, 2015
    Posts:
    26
    Minecraft User:
    Anonymous4life
    Lol might be true xD
  8. andre_the_gamer
    Offline

    andre_the_gamer Active Member

    Joined:
    Feb 5, 2015
    Posts:
    112
    Minecraft User:
    Andre_The_Gamer
    LoL XD

Share This Page

Advertisement