Solved Factions pvp betweens allies players

Discussion in 'Plugin Development' started by maxiz22, Sep 2, 2014.

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

    maxiz22

    Hi, I have a problem for players of the same faction can be damaged. The code I am using for this is:

    Code:java
    1. public void onplayerpvpfactions(FactionsEventPvpDisallowed event){
    2. Player attacker = event.getAttacker();
    3. Player defender = event.getDefender();
    4.  
    5. if(!MultiEventos.getPlayerListManager().containsPlayer(defender) ||
    6. !MultiEventos.getPlayerListManager().containsPlayer(attacker)) return;
    7.  
    8.  
    9. event.getEvent().setCancelled(false);
    10.  
    11. }


    But the pvp between allies players o players in same faction is cancelled.
    I could not find any solution in other plugins source code or in this forum.
    If anyone has a solution to this problem would be greatly appreciated!
    sorry for my English. Greetings

    anyone?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  2. Offline

    maxiz22

  3. Offline

    maxiz22

    i solve this importing mcore lib in my plugin
     
Thread Status:
Not open for further replies.

Share This Page