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

Crash on teleport to another world

Discussion in 'Development' started by SkyZone, Nov 4, 2018.

  1. SkyZone

    SkyZone Slime

    Messages:
    95
    If I telelport a player with
    PHP:
    $player->telelport(new Location(...));
    to another world, the client crashes.

    Does someone know how to fix this?
     
  2. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
  3. Emirhan Akpınar

    Emirhan Akpınar Slime

    Messages:
    90
    PHP:
    $level Server->getLevelByName("worldName");
    if (
    $level instanceof Level) {
      
    Player->teleport(new Position(xyz$level));

    }
     
  4. SkyZone

    SkyZone Slime

    Messages:
    95
    Well, seems like it fixed it
    Thanks!
     
  5. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Really? That easy? What if the hotbar is crashing?
     
  6. SkyZone

    SkyZone Slime

    Messages:
    95
    That doesn't happen. But now the game also doesn't crash if I use Location.
    Idk what fixed it lol
     
  7. SkyZone

    SkyZone Slime

    Messages:
    95
    Okay its not fixed
     
  8. SkyZone

    SkyZone Slime

    Messages:
    95
    @dktapps @SOFe Why don't you implement loading screen on world change or fix it in another way?
     
  9. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Before we get into that, that's only a theory. The bug may appear again even if you add that. As I can see we are talking about two different things though. But the loading screen has to be added anyways. All the featured servers use it and I am sure it is not for decoration.
     
    SkyZone likes this.
  10. SkyZone

    SkyZone Slime

    Messages:
    95
    But if all the featured servers use it....
     
  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.