Solved Getting Location of Nether Portal

Discussion in 'Plugin Development' started by Smeary_Subset, Jul 22, 2024.

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

    Smeary_Subset

    I have created my own custom multiverse-like plugin to manage multiple worlds. One problem I needed to solve was, when a player enters the nether from one world, how to get that player to teleport to that world instead of the level world (which seems to happen by default).

    I leverage PlayerChangedWorldEvent to do this. However, that event only stores the World that the player came from, not the location that they teleported from (i.e the nether portal). So, when the player returns from the nether, the best I can do it teleport them to the original world's spawn location, not where the nether portal is.

    Anyone know a way I can get the player's location before teleporting to another world?
     
  2. Offline

    KarimAKL

  3. Offline

    Smeary_Subset

    KarimAKL likes this.
Thread Status:
Not open for further replies.

Share This Page