Exemplo n.º 1
0
 public bool Claims(string fileName)
 {
     try {
         using (FileStream mapStream = File.OpenRead(fileName)) {
             GZipStream   gs = new GZipStream(mapStream, CompressionMode.Decompress, true);
             BinaryReader bs = new BinaryReader(gs);
             return(bs.ReadByte() == 10 && NBTag.ReadString(bs) == "MinecraftLevel");
         }
     } catch (Exception) {
         return(false);
     }
 }
Exemplo n.º 2
0
 public bool Claims(string fileName)
 {
     if (fileName == null)
     {
         throw new ArgumentNullException("fileName");
     }
     try {
         using (FileStream mapStream = File.OpenRead(fileName)) {
             GZipStream   gs = new GZipStream(mapStream, CompressionMode.Decompress, true);
             BinaryReader bs = new BinaryReader(gs);
             return(bs.ReadByte() == 10 && NBTag.ReadString(bs) == "ClassicWorld");
         }
     } catch (Exception) {
         return(false);
     }
 }