Auto-Switch Team

Discussion in 'Plugin Development' started by Acer_Mortem, Jan 19, 2013.

  1. Offline

    Acer_Mortem

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Okay, I'm currently making a team plugin, and I want to make it so that when you join the server, it auto puts you into a team. How can I make it so that when player1 joins, they will be blue, then the second player joins and will be red, then a third joins and will be blue, etc.
  2. Offline

    adam753

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    You mean change the colour of their players' skin texture? I don't think that's possible, the player gets to decide what they look like. I suppose if you want to colour-code people you could force them to wear dyed leather, but that would prevent the use of actual armour.
  3. Offline

    Craftiii4

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hmm? I think he means so it knows which team to put the player in.

    If you do mean this then you need to get the amount of people in team blue and the amount of people in team red.
    If the players in team blue is less than or equal to team red, add to team blue. Else (red is less) then add to red.

    The reason for the equal to is to prevent it failing if the teams have the same amount of players.
    Acer_Mortem likes this.
  4. Offline

    Craftiii4

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Setting the players head to the dyed wool colour could be a better alternative ^^

Share This Page