Solved Teleporting players to defaultworld's nether from another world?

Discussion in 'Plugin Development' started by Neilnet, Apr 12, 2015.

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



    Worlds that I have:

    World (being the default)

    PlayingWorld (not the default)

    Now: IF the player enters a portal from World, he can go to World_Nether, but if a player enters a portal from PlayingWorld he cannot go into the portal.

    Is there I can be teleporting players to defaultworld's nether from another world?
  2. Offline



    You can use a PlayerPortalEvent (off the top of my head) and EntityPortalEvent (also off the top of my head)
  3. Offline


    That's what I was doing. There is no way to teleport the player to the Nether portal in the nether where the player is safe.
  4. Offline


    What do you mean exactly?
  5. Offline


    Bukkit.getWorld("world_nether").getSpawnLocation(); doesn't return the location of which is safe & has a nether portal near by to get back to the overworld.

    Last edited: Apr 13, 2015
  6. Offline


    I made my own FindNetherSafeSpot() which scans through a small area, and it searches for a safe area for the player to spawn. Then I teleport players there if they wish to get to the nether. Though, I cannot really have a nether portal there. I feel like I'm missing out on something already implemented in the Bukkit API to make my life easier.
  7. Offline


    @Neilnet I feel like I'm not getting what you want exactly. Try and explain it in steps or something.
    • You want players to use a portal from Non-Default World to Default World Nether?
  8. Offline


    Yes, exactly like that. the onPlayerPortal event is called. Although they cannot really teleport to the default world.

    So player is on non-default world
    > Makes portal
    > Enters portal
    > Doesn't teleport to default world nether.

    Steps I've done:
    When onPlayerPortal is called, I teleport players to the default world_nether's spawnLocation with:

    but that method returns 0, 0, 0 for world_nether which is on top of the nether, which basically doesn't allow the player to use the nether world.
  9. Offline


    @Neilnet So players being teleported will be teleported to a some-what predefined area or an already placed portal, or create one if necessary?
    Last edited: Apr 14, 2015
  10. Offline


    That was the solution I thought of, but it's too time consuming. Is there a way to get the safe spot? Not the
    Bukkit.getWorld("world_nether").getSpawnLocation() which returns (x=0, y=0, z=0) which is on top of the nether.

    So the normal area you'd get if you walked into a portal? Although this is from another world, not the defaultworld's nether?

    Okay, I just want to restate this:

    I have a custom world generated through code on the server.

    When the player enters the custom world, and makes a portal and goes into it. Nothing occurs. I'm trying to make it so when he goes in, he goes into the default world's nether (world_nether).
    Last edited by a moderator: Apr 14, 2015
  11. Offline


  12. Offline


    After doing some API learning, I learned how to do this.

    Thanks for helping me! You've helped me in other posts too, and each of your replies has been so useful
Thread Status:
Not open for further replies.

Share This Page