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

Halp me ;-;

Comments in 'Plugin Development' started by PalkiaDudeYT, Oct 6, 2015.

  1. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    I need to know how to fix this:
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    XD you forgot an ; the above the latest line :p(
    PHP:
    $event->$player->$pos->setBlock(new Vector3($x$y$z), Block::get(0))//add ;
    )
    TheKofola12 likes this.
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    What the .. is $event->$player->$pos
    Taha_The_Hacker likes this.
  4. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Yes it has to be
    PHP:
    $pos->setBlock(new Vector3($player->getFloorX(), $player->getFloorY() -1$player->getFloorZ), Block::get(0));
    instead of
    PHP:
    $event->$player->$pos->setBlock(new Vector3($x$y$z), Block::get(0))
    the $x, $y ,$z variables were undefined..
    Last edited: Oct 6, 2015
    TheKofola12 likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Please don't post if you don't know what you are doing. We don't need somebody who copies and pastes code, and sometimes creates something that is entirely wrong.
  6. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    This was already fixed...
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No it isn't. And it is getFloorZ(), not getFloorZ.
    And you could simply do $player->subtract(1).
    Jelly9912 and zombie_Power like this.
  8. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    I think he was trying to fix someone's code.
  9. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    EDIT:
    LOL? $event->$player->$pos...
    use
    PHP:
    $event->getPlayer()->getLevel()->setBlock($event->getBlock()->getPosition(),Block::get(0));
    Last edited: Oct 7, 2015
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $event->player is a private property. You can't access it.
    Jelly9912 and Kvetinac97 like this.

Share This Page

Advertisement