Check if player is in SafeZone (Factions)

Discussion in 'Plugin Development' started by Krumb069, May 15, 2015.

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

    Krumb069

    I looked the api but it didn't help. How can I check if player is in SafeZone ?
     
  2. Offline

    BagduFagdu

    Untested.

    Code:
    FLocation location = FPlayers.i.get("Player").getLastStoodAt();
          if(Board.getFactionAt(location).isSafeZone() == true) {
              // Do Stuff...
    }
     
  3. Offline

    flash1110

    @BagduFagdu That's the outdated way.

    I found this within 10 seconds of googling, gives you the information right here: http://www.massivecraft.com/factions-develop

    Code:
    Location location = new Location(Bukkit.getWorld("derp"), 1337, 1337, 1337);
    Faction faction = BoardColl.get().getFactionAt(PS.valueOf(location));
     
  4. no point in checking == true on a boolean. It will return true and then false anyways....
     
    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page