Esempio n. 1
0
 /*
  *  {
  *      "timestamp":该属性值被生成时的时间戳(Java 时间戳格式,即自 1970-01-01 00:00:00 UTC 至今经过的毫秒数),
  *      "profileId":"角色 UUID(无符号)",
  *      "profileName":"角色名称",
  *      "textures":{ // 角色的材质
  *          "材质类型(如 SKIN)":{ // 若角色不具有该项材质,则不必包含
  *              "url":"材质的 URL",
  *              "metadata":{ // 材质的元数据,若没有则不必包含
  *                  "键":"值"
  *                  // ,...(可以有更多)
  *              }
  *          }
  *          // ,...(可以有更多)
  *      }
  *  }
  */
 public SkinHandler(string puuid, string pname, List <Texture> textures)
 {
     timestamp      = GetTimeStamp();
     profileId      = puuid;
     profileName    = pname;
     this.textures  = textures;
     trusted_source = ThirdPartAPIs.getTrustedSkinServer();
 }
Esempio n. 2
0
 public static bool CheckSkinSourceTrusted(string url)
 {
     try
     {
         string[] trusted_sourcE = ThirdPartAPIs.getTrustedSkinServer();
         Uri      u      = new Uri(url);
         string   domain = u.Host;
         foreach (string trusted in trusted_sourcE)
         {
             if (domain.Contains(trusted))
             {
                 return(true);
             }
         }
         return(false);
     }
     catch
     {
         return(false);
     }
 }