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

Help please

Comments in 'Plugin Development' started by iDirtPlayzMC, Jun 27, 2015.

  1. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    Hello I just wanted you to help me ( if you could ) with the code im trying to make
    ...
    Im trying to make plugin where when player step on emerald block and then they will get Effect automatically..
    I dont know how to use Vector3
    heres code...

    PHP:
    public function onMove(PlayerMoveEvent $ev) {
    $player = strtolower($ev->getPlayer()->getName());

    ????????????????????????????????????????????????????

    $player->addEffect(Effect::getEffect(1)->setDuration(20*10)->setVisible(false));
    $player->addEffect(Effect::getEffect(8)->setDuration(20*10)->setVisible(fals[/PHP]
  2. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    PHP:
    $to $ev->getTo();
    $id $to->getLevel()->getBlockIdAt($to->getX(),$to->getY()-1,$to->getZ());
    Then you check if $id == the block you want...
  3. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    ok thank you :3

Share This Page

Advertisement