API/src/main/java/xyz/invisraidinq/rocketapi/api/database/mongo/RocketMongo.java
/**
     * Connect to an {@link MongoDatabase}
     *
     * @return The connected {@link MongoDatabase} database
     */
Connect to an  MongoDatabase
@return The connected  MongoDatabase database
Connect to an MongoDatabase @return The connected MongoDatabase database
@Override
    public MongoDatabase connect() {
        ServerAddress serverAddress = new ServerAddress(this.address, this.port);
        MongoClient mongoClient;
        if (this.authEnabled) {
            mongoClient = new MongoClient(serverAddress, Collections.singletonList(MongoCredential.createCredential(
                    this.username,
                    this.authDatabase,
                    this.password
            )));
        } else {
            mongoClient = new MongoClient(serverAddress);
        }
        return mongoClient.getDatabase(this.databaseName);
    }
@ Override public MongoDatabase connect ( ) { ServerAddress serverAddress = new ServerAddress ( this . address , this . port ) ; MongoClient mongoClient ; if ( this . authEnabled ) { mongoClient = new MongoClient ( serverAddress , Collections . singletonList ( MongoCredential . createCredential ( this . username , this . authDatabase , this . password ) ) ) ; } else { mongoClient = new MongoClient ( serverAddress ) ; } return mongoClient . getDatabase ( this . databaseName ) ; }
Connect to an {@link MongoDatabase}
 @return The connected {@link MongoDatabase} database
Connect to an { @link MongoDatabase } @return The connected { @link MongoDatabase } database