1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

has getY() been removed?

Discussion in 'Development' started by TwistedAsylumMC, Apr 3, 2018.

  1. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    Just a questiom, has Player::getY() and Block::getY() been removed? because PHPStorm is saying its not a thing and github search isnt finding anything. Player::getX() and Player::getZ() work but just not Y. If anyone could answer my question i would appreciate it. (Also if it has been removed, how can i get a players Y coordinate?)
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
  3. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
  4. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    $player->getY() is fine.
     
  5. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    But i dont like the errors PhpStorm gives xD
     
  6. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    That's PhpStorm's personal problem.
     
  7. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    PHP says getY() does not exist but getX() exists? Or you simply modified your local copy/didn't setup PhpStorm properly?
     
    SalmonDE likes this.
  9. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    just refetch your pmmp lib
    also invalidate all cache may help
    on the other hand, make sure that thing is what you think it is
    like do assert or if $var instance of whatIThinkItIs
     
  10. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    the "pocketmine\math" namespace has been moved to a Composer library. Make sure you install Composer dependencies and add PocketMine's "vendor" directory to your library paths.
     
    HimbeersaftLP likes this.
  11. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    where do i get the vendor from?
     
  12. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.