Solved IF sendmessage HELP ***

Discussion in 'Spigot Plugin Development' started by Achieving, Apr 19, 2017.

  1. Yeah ill explain a bit better

    So with a HCF factions plugin i want it to display if a faction is a power faction, a power faction is decided on the amount of members it has.

    The method to get number of members is this.getMembers().size()

    The true/false needs to be on the same line as ChatColor.YELLOW + "Power Faction: "
     
    #1 Achieving, Apr 19, 2017
    Last edited: Apr 19, 2017
  2. Try getting the size differently

    Code (Text):
    int size = Bukkit.getServer().getOnlinePlayers().size();
                    if (size >= 15) {
                       
                    } else {
                   
                }
       
     
  3. Showing your code would be helpful we don't know if your storing your members in an Array / ArrayList or something else
     
  4. Just check it when a player joined ^_^
     
  5. Yeah ill explain a bit better

    So with a HCF factions plugin i want it to display if a faction is a power faction, a power faction is decided on the amount of members it has.

    The method to get number of members is this.getMembers().size()

    The true/false needs to be on the same line as ChatColor.YELLOW + "Power Faction: "
     
  6. If this.getMembers().size() >= someNumber

    Set the Boolean to true

    Then on the power faction line
    ChatColor.YELLOW + "Power Faction: " + theBooleanVariable


    If you set it to false by default it would only ever change to true if they had enough members and would always display accordingly.


    Sent from my iPhone using Tapatalk
     
    • Winner Winner x 1