How do I teleport a player into a different multiverse world (code)

Discussion in 'Plugin Development' started by NightCraftHD, Jul 14, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    NightCraftHD

    I am making my first mini game plugin and i want to teleport the player into a different multiverse world. I have tried multiple thing, but they where all from 2014 etc.
    Any help is greatly appreciated!

    btw idk if this is the place to ask this. I wanted to post it here, but i couldn't find a post button lol: https://bukkit.org/forums/#bukkit.1
     
  2. Online

    timtower Moderator Moderator

    @NightCraftHD Because that is a category, not a section.
    Moved to plugin development.
    Player#teleport(Location)
     
  3. Offline

    NightCraftHD

    @timtower
    Locationlocation=player.getLocation();
    player.teleport(strider);
    location.setX(-16);
    location.setY(43);
    location.setZ(76);
    player.teleport(location);


    sry for annoying you about this. But this is my code. It gives me an error. (the name of the world is strider: 1.16 server)
     
  4. Offline

    Strahan

    There isn't anything special about it, it's a regular teleport as timtower shown. If you have a specific landing spot in mind, create a Location using the desired world with the block coords you need. If not, just get the world object and use the getSpawnLocation() and pass that to the player teleport.

    Obviously, null check the world object first.
     
Thread Status:
Not open for further replies.

Share This Page