Solved Check what world a player is in

Discussion in 'Plugin Development' started by ZingCraft, Jan 21, 2013.

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

    ZingCraft

    Hi. I am working on a plugin and I want to detect which world the player is in. I am using the Player move event because I want this thing to happen whenever the player moves.

    Thanks
     
  2. World w = evt.getPlayer().getWorld();

    Where evt is your event variable.

    Oh and by the way, don't do this on player move, there is no need to update it so often. Just monitor the player login and player teleport events.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  3. Offline

    ZingCraft

    Actually, I can probably use the bukkit scheduler tasks.

    Thanks for your help

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  4. ZingCraft
    Yes, a scheduler task would work also, depending on what you are using the data for.
     
Thread Status:
Not open for further replies.

Share This Page