title: SnakeYAML loadAs() returns null
body: <p>I attempted to create a Spigot plugin today and I'm coming up with an error that's hard to fix. When I was trying to create a file system to save some data I downloaded the source code for the library SnakeYAML and put it in my src. Then I followed <a href="https://www.java-success.com/yaml-java-using-snakeyaml-library-tutorial/" rel="nofollow noreferrer">this tutorial</a> and created a config and followed all the instructions. I'm getting a NullPointerException. It turns out the config object is null. I'm not sure what's happening.</p>
  
  <pre><code>PlayerYML getConfig(File playerYml) {
      try {
          InputStream ymlStream = new FileInputStream(playerYml.getAbsolutePath());
          System.out.println(ymlStream);
          PlayerYML config = yaml.loadAs(ymlStream, PlayerYML.class);
          return config;
      } catch (Exception ex) {
          System.out.println("getConfig() error");
          ex.printStackTrace();
          return null;
      }
  }
  </code></pre>
  
  <p>Here is my PlayerYML class:</p>
  
  <pre><code>import java.util.Map;
  
  public class PlayerYML {
  
      private int reputation;
      private Map&lt;String/*UUID*/, String/*Date*/&gt; map;
  
      public int getReputation() {
          return reputation;
      }
  
      public void setReputation(int reputation) {
          this.reputation = reputation;
      }
  
      public Map&lt;String, String&gt; getMap() {
          return map;
      }
  
      public void setMap(Map&lt;String, String&gt; map) {
          this.map = map;
      } 
  }
  </code></pre>
  
  <p>I appreciate all help! Thank you :)</p>