Solved Moving worlds

Discussion in 'Plugin Development' started by tkuiyeager1, Oct 1, 2015.

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

    tkuiyeager1

    hey everyone i wanted to know how can i know when player is moving between worlds?
     
  2. Offline

    Binner_Done

    When they are in-between moving or just when they are in the specific world?
     
  3. Offline

    tkuiyeager1

    @Binner_Done i mean lets say im in WorldA and now im moving to WorldB.
     
  4. Offline

    Binner_Done

    @tkuiyeager1 So checking if they are in the world is;
    Code:
    if (player.getWorld().equals(myWorld)){
         //Code here...
    }
    Replace the .equals()){ Replace the bold bit with the world

    This should work OK
     
  5. Offline

    tkuiyeager1

    @Binner_Done but in wich method it should be? i dont want it to be on command.
    so i need to put it on OnEnable or on event or on something else, where i need to put it?
     
  6. Offline

    timtower Administrator Administrator Moderator

  7. Offline

    tkuiyeager1

    @timtower so i should use the player move event and check his GetTo world?
     
  8. Offline

    timtower Administrator Administrator Moderator

    Or the teleport event, might be easier and runs less frequent.
     
  9. Offline

    tkuiyeager1

Thread Status:
Not open for further replies.

Share This Page