Solved How to check if a player can damage another player using Factions API

Discussion in 'Plugin Development' started by Joiner, Oct 22, 2014.

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

    Joiner

  2. Offline

    fireblast709

    Joiner I think UPlayer has a method for getting the relation with another UPlayer.
     
  3. Offline

    Joiner

  4. Offline

    Joiner

    Bump.
     
  5. Offline

    fireblast709

    Joiner in the last source they seem to be using MPlayer, but the method getRelationTo most certainly exists.
     
  6. Offline

    Joiner

    fireblast709
    MPlayer does not have a method called getRelationTo(), UPlayer has.
    I'd prefer a simple canDamage() function, but doesn't matter.
    Code:java
    1. UPlayer.getRelationTo(RelationPartecipator)

    What is RelationPartecipator object? How do I get it?
     
  7. Offline

    fireblast709

    Joiner it's another UPlayer or Faction.
     
  8. Offline

    Joiner

    fireblast709 Thank you!
    Code:java
    1. UPlayer.get(Player).getRelationTo(UPlayer.get(Player)).isFriend();
     
Thread Status:
Not open for further replies.

Share This Page