package fr.aumgn.diamondrush.game;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.bukkit.ChatColor;

import fr.aumgn.diamondrush.Util;

public enum TeamColor {

    BLUE          (ChatColor.BLUE,          11,     "Bleu"         ),
    RED           (ChatColor.DARK_RED,      14,     "Rouge"        ),
    GREEN         (ChatColor.DARK_GREEN,    13,     "Vert"         ),
    PURPLE        (ChatColor.LIGHT_PURPLE,   2,     "Violet"       ),
    ORANGE        (ChatColor.GOLD,           1,     "Orange"       ),
    WHITE         (ChatColor.WHITE,          0,     "White"        ),
    GRAY          (ChatColor.DARK_GRAY,      8,     "Gris"         ),
    AQUA          (ChatColor.AQUA,           3,     "Turquoise"    ),
    DARK_PURPLE   (ChatColor.DARK_PURPLE,   10,     "Violet Foncé" ),
    LIGHT_GREEN   (ChatColor.GREEN,          5,     "Vert clair"   ),
    BLACK         (ChatColor.BLACK,         15,     "Noir"         ),
    YELLOW        (ChatColor.YELLOW,         4,     "Jaune"        );

    private final ChatColor chat;
    private final byte wool;
    private final String name;

    private TeamColor(ChatColor chat, int wool, String name) {
        this.chat = chat;
        this.wool = (byte) wool;
        this.name = name;
    }

    public ChatColor getChatColor() {
        return chat;
    }

    public byte getWoolColor() {
        return wool;
    }

    public String getColorName() {
        return name;
    }

    public static List<TeamColor> getRandomColors(int count) {
        List<TeamColor> list = new ArrayList<TeamColor>(count);
        TeamColor[] colors = values();
        for (int i = 0; i < count; i++) {
            list.add(colors[i]);
        }
        Collections.shuffle(list, Util.getRandom());
        return list;
    }
}

@@ -415,21 +415,21 @@
  ),%0A    
-PURPL
+ORANG
 E       
@@ -444,38 +444,38 @@
 lor.
-LIGHT_PURPLE,   2
+GOLD,           1
 ,     %22
-Violet
+Orange
 %22   
@@ -481,35 +481,35 @@
      ),%0A    
-ORANGE     
+DARK_PURPLE
    (ChatColo
@@ -514,39 +514,39 @@
 lor.
-GOLD,           1
+DARK_PURPLE,   10
 ,     %22
-Orang
+Mauv
 e%22
+ 
     
@@ -765,78 +765,8 @@
  ),%0A
-    DARK_PURPLE   (ChatColor.DARK_PURPLE,   10,     %22Violet Fonc%C3%A9%22 ),%0A
     

Update team colors