Faction API Help

Discussion in 'Spigot Plugin Development' started by ServerProxy, Apr 25, 2017.

  1. Just to ask for, that is a scoreboard that displays a prefix, where do you need a factionsapi for that?
     
  2. lol they want the FactionsAPI to get the name of the user's faction for the nametag.
     
    • Informative Informative x 1
  3. Thanks for explaining it better.
     
  4. When a player joins, meaning playerJoinEvent(), get their faction (using the Faction plugin as a library), and set it as a scoreboard object. Then set that scoreboard object to display over the player's head.
     
  5. Or he may have to use packets. Because for every person it's different. Like, to Jimmy, it's his teammate, to Alex, he's an enemy and to John, he's a truce.
     
  6. So on playerJoinEvent, just loop through all online players and set that user's String equal to whatever the other player's relation is + faction tag/name... then do it again for every other player.

    Probably not very efficient, but it's all I can think of rn.