title: My MongoDB .find() method is returning null even thought the data exists
body: <p>I am trying to find a user's UUID in my database, but it's returning null for no reason. It's in the connect() method. I can find this manually, and in my project in javaScript. But for some reason, I'm getting this error.</p>
  <pre><code>public final class DiscordLink extends JavaPlugin implements Listener {
  public MongoCollection&lt;Document&gt; users;
  public MongoDatabase mongoDatabase;
      @Override
      public void onEnable() {
          System.setProperty(&quot;DEBUG.GO&quot;, &quot;true&quot;);
          System.setProperty(&quot;DB.TRACE&quot;, &quot;true&quot;);
          Logger mongoLogger = Logger.getLogger(&quot;org.mongodb.driver&quot;);
          mongoLogger.setLevel(Level.WARNING);
          connect();
  
          getServer().getConsoleSender().sendMessage(ChatColor.GREEN + &quot;[DiscordLink] Plugin enabled...&quot;);
  
          getServer().getPluginManager().registerEvents(this, this);
  
      }
  
      @Override
      public void onDisable() {
          getServer().getConsoleSender().sendMessage(ChatColor.RED + &quot;[DiscordLink] Plugin disabled...&quot;);
      }
  
      public void connect() {
          MongoClient mongoClient = MongoClients.create(&quot;MONGOURI&quot;);
          MongoDatabase mongoDatabase = mongoClient.getDatabase(&quot;myFirstDatabase&quot;);
          MongoCollection&lt;Document&gt; users = mongoDatabase.getCollection(&quot;users&quot;);
          Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + &quot;[DiscordLink] Connected to database!&quot;);
      }
  
      @EventHandler
      public void onPlayerJoin(PlayerJoinEvent event) {
          Player player = event.getPlayer();
          Document document = users.find(Filters.eq(&quot;mcUUID&quot;, player.getUniqueId().toString())).first();
          if(document != null) {
              player.kickPlayer(ChatColor.RED + &quot;Discord Authentication Failed!&quot;);
          } else { return; }
  </code></pre>
  <p>Error:</p>
  <pre><code>[15:43:01 ERROR]: Could not pass event PlayerJoinEvent to DiscordLink v1.0-SNAPSHOT
  java.lang.NullPointerException: Cannot invoke &quot;com.mongodb.client.MongoCollection.find(org.bson.conversions.Bson)&quot; because &quot;this.users&quot; is null
  </code></pre>