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

Solved spawn-distance

Comments in 'Plugin Development' started by PaulchenHD, Jun 26, 2016.

  1. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    if the player is more than 30 blocks away from the spawn ... ? :)

    thx for help c:
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHP:
    if($player->distance($player->getLevel()->getSafeSpawn()) > 30){
    // Do something
    }
    HotFireyDeath and PaulchenHD like this.
  3. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    thank you ! ;)

Share This Page

Advertisement