Solved Using factionUUID api

Discussion in 'Spigot Plugin Development' started by Nighterance, May 4, 2017.

  1. Hello!
    So i need to get player's faction name, I added factionuuid api to my project, and tryed to get faction name, then putted it on scoreboard:

    FPlayer fplayer = FPlayers.getInstance().getById(p.getUniqueId().toString());
    Faction faction = fplayer.getFaction()


    Result: upload_2017-5-4_20-19-49.png

    Any ideas?
     
  2. String name = faction#getTag() or getTitle not sure
     
  3. Not sure what you are trying, but i assume you are displaying the faction class name.
    maybe there's something like "fplayer.getFaction().getName()" or similar.
     
  4. Tryed both, did not work.
     
  5. Could you provide a small link to the api of that faction classes? so i can check that site.
    Edit: And maybe post your class where you apply the scoreboard lines.
     
  6. Try this
    Code (Text):
    FPlayer fplayer = FPlayers.getInstance().getByPlayer(p);
    Faction faction = fplayer.getFaction();
    String name = faction.getTag();
     
  7. You are the man! Thanks