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

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

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

    Deleted user

  2. Offline

    fireblast709

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

    Deleted user

  4. Offline

    Deleted user

  5. Offline

    fireblast709

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

    Deleted user

    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

    Deleted user

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

Share This Page