Detecting When Players Enter A World (not joins)

Discussion in 'Plugin Help/Development/Requests' started by ~NOVA~, Jul 16, 2017 at 9:15 PM.

  1. Offline

    ~NOVA~

    I'm using Multiverse (I don't know if it makes a difference) and I have been trying to send the player a message when they enter a specific world. It shouldn't be when the player joins and happens to be in that world(so it can't be PlayerJoinEvent), it should be when the player teleports into that world. Any suggestions?
     
  2. @~NOVA~
    Use PlayerTeleportEvent.
    Check if the world the player left is different than the one he went to. And then check if he went to that specific event.
     
  3. @X1machinemaker1X @~NOVA~
    Or just use PlayerChangedWorldEvent, and check if the player's current world (Player#getWorld) is equal to the specific world.
     
  4. @Zombie_Striker I swear I searched for ChangedWorld on the java docs cause I was sure there was an event. Whoops:p
     
  5. Offline

    ~NOVA~

    Great thanks! I'll try that soon.
     

Share This Page