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

Solved Teleporting to world

Discussion in 'Plugin Help' started by iiFlamiinBlaze, Oct 7, 2017.

  1. iiFlamiinBlaze

    iiFlamiinBlaze Witch

    Messages:
    59
    GitHub:
    iiflamiinblaze
    can anyone help me with this. I’m trying to teleport a player to a different world on PlayerInteractEvent. Thanks!
     
  2. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    on PlayerInteractEvent:
    PHP:
    $event->getPlayer()->teleport($this->getServer()->getLevelByName("differentWorldName")->getSafeSpawn());
     
  3. iiFlamiinBlaze

    iiFlamiinBlaze Witch

    Messages:
    59
    GitHub:
    iiflamiinblaze
    Thanks so much!
     
  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.