Solved Hooking into Factions question

Discussion in 'Plugin Development' started by JjPwN1, Feb 6, 2013.

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

    JjPwN1

    I have tried many ways, but it can never work. I need to see if a player is in SafeZone, and if they are, do something. I hooked into Faction's methods and classes, so someone who is experienced with using Factions in their plugins could help me out here.
     
  2. Offline

    zRations

    I cannot find anywhere to check if a player is in a SafeZone in their API. Why check the players location and see if they are inside of two coords?
     
  3. Offline

    chasechocolate

    Because why have to define a new location if you already have one for Factions? Simplicity :p
     
  4. Offline

    JjPwN1

    Because I need to know if they're in a SafeZone anywhere in the world(s). And that'd take quite a bit to find all of those, as my server's world has grown to be more than 7.5GB (my server host does NOT like this xD).
     
  5. Offline

    zRations

    I didn't find a way to check if the players was in a Faction SafeZone via their API. Unless I overlooked it, that would be one of the only solutions to do.

    Are the SafeZones not placed by admins? And im sure Factions keeps a yml file on the locations of the SafeZones. Defining a area shouldn't be to hard.
     
  6. Offline

    JjPwN1

    They are placed by an admin, but what about the existing SafeZones? Also, I couldn't find in any Faction files the SafeZone chunks that are claimed.
     
  7. Offline

    JjPwN1

    I found a fix for this, by the way:

    Code:
    import com.massivecraft.factions.Board;
    import com.massivecraft.factions.Faction;
    import com.massivecraft.factions.FLocation;
     
    Faction otherFaction = Board.getFactionAt(new FLocation(player.getLocation()));
    if(!otherFaction.isSafeZone()){
        //do stuff
    }
     
Thread Status:
Not open for further replies.

Share This Page