Player faction test

Discussion in 'Spigot Plugin Development' started by WitherAssassin, Jul 2, 2015.

  1. Hello I am working on a 1v1 plugin for a server (it uses factions plugin) ... and I need to make sure that two players of the same faction don't join the 1v1.

    Is there a way to check in which faction a player is?

    I am sorry if this was answered before but I couldn't find it anywhere.
     
  2. Creeoer

    Supporter

    Yeah,
    Create a new player from the player's UUID (MPlayer.get(UUID);
    Get that mplayer's faction by just using the getFaction() method.
     
  3. Thanks ... any idea how to avoid detecting people from "Wilderness" ?
     
  4. Creeoer

    Supporter

    Create a condition as to where if one of the player's faction were to be wilderness then run with your code?
     
    • Agree Agree x 1