Solved Check what world a player is in

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

  1. Offline

    ZingCraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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. Offline

    Adamki11s

    My BukkitDev Profile
    My Plugins (1)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    World w = evt.getPlayer().getWorld();

    Where evt is your event variable.
     
  3. Offline

    Adamki11s

    My BukkitDev Profile
    My Plugins (1)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
     
  4. Offline

    ZingCraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Actually, I can probably use the bukkit scheduler tasks.
     
  5. Offline

    ZingCraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thanks for your help
     
  6. Offline

    Adamki11s

    My BukkitDev Profile
    My Plugins (1)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    ZingCraft
    Yes, a scheduler task would work also, depending on what you are using the data for.
     

Share This Page