public static string[] RoleToNameAndColors(Plugin.Role role)
 {
     if ((role & Plugin.Role.ExiledDeveloper) == Plugin.Role.ExiledDeveloper)
     {
         return(new string[3] {
             "Exiled Dev", "magenta", "00FFFF"
         });
     }
     else if ((role & Plugin.Role.ExiledContributor) == Plugin.Role.ExiledContributor)
     {
         return(new string[3] {
             "Exiled Contributor", "cyan", "800080"
         });
     }
     else if ((role & Plugin.Role.PluginDeveloper) == Plugin.Role.PluginDeveloper)
     {
         return(new string[3] {
             "Exiled Plugin Dev", "crimson", "DC143C"
         });
     }
     else
     {
         return(new string[3]);
     }
 }
 public void OnPlayerVerify(VerifiedEventArgs ev)
 {
     Timing.CallDelayed(0.5f, () =>
     {
         startingBadgesAndColors.Add(ev.Player, new Tuple <string, string>(ev.Player.RankName, ev.Player.RankColor));
         string PlayerID = HashSh1(ev.Player.UserId);
         if (Plugin.Instance.CreditTags.ContainsKey(PlayerID))
         {
             Plugin.Role role       = (Plugin.Role)Plugin.Instance.CreditTags[PlayerID];
             string[] nameAndColors = RoleToNameAndColors(role);
             EnableBadgeOrCPT(ev.Player, nameAndColors);
         }
     });
 }
 public static Plugin.Role HighestRole(Plugin.Role role)
 {
     if ((role & Plugin.Role.ExiledDeveloper) == Plugin.Role.ExiledDeveloper)
     {
         return(Plugin.Role.ExiledDeveloper);
     }
     else if ((role & Plugin.Role.ExiledContributor) == Plugin.Role.ExiledContributor)
     {
         return(Plugin.Role.ExiledContributor);
     }
     else if ((role & Plugin.Role.PluginDeveloper) == Plugin.Role.PluginDeveloper)
     {
         return(Plugin.Role.PluginDeveloper);
     }
     else
     {
         return(Plugin.Role.None);
     }
 }