public static RoleInfo GetRole(this Player p) { if (CustomRoles.users.ContainsKey(p.UserId)) { var role = CustomRoles.GetRole(p); return(new RoleInfo(role.id, role.classId)); } return(new RoleInfo(null, (int)p.Role)); }