Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

if player is in a specific world

Comments in 'Plugin Development' started by Driesboy1, Feb 17, 2016.

  1. Driesboy1
    Offline

    Driesboy1 Active Member

    Joined:
    Oct 28, 2015
    Posts:
    102
    Minecraft User:
    Driesboy
    hi

    i need a code for checking of player is in the specific world set in the Config.yml
  2. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    PHP:
    if($player->getLevel()->getName() == $this->getConfig()->get('world')){
        
    // Do-something
    }
    Skullex, PocketKiller and PEMapModder like this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use === to compare. It is faster for this purpose.
  4. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Ok

Share This Page

Advertisement