mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Fix compile and some minor formatting errors
This commit is contained in:
parent
9c92522564
commit
da9977a30f
@ -328,7 +328,7 @@ data:
|
||||
# The prefix to use for all LuckPerms collections. Change this if you want to use different
|
||||
# collections for different servers. The default is no prefix.
|
||||
mongodb_collection_prefix: ''
|
||||
|
||||
|
||||
# MongoDB ClientConnectionURI for use with replicasets and custom connection options
|
||||
# See https://docs.mongodb.com/manual/reference/connection-string/
|
||||
mongodb_connection_URI: ''
|
||||
|
@ -270,7 +270,7 @@ data:
|
||||
# The prefix to use for all LuckPerms collections. Change this if you want to use different
|
||||
# collections for different servers. The default is no prefix.
|
||||
mongodb_collection_prefix: ''
|
||||
|
||||
|
||||
# MongoDB ClientConnectionURI for use with replicasets and custom connection options
|
||||
# See https://docs.mongodb.com/manual/reference/connection-string/
|
||||
mongodb_connection_URI: ''
|
||||
|
@ -404,12 +404,12 @@ public class ConfigKeys {
|
||||
* The prefix for any MongoDB collections
|
||||
*/
|
||||
public static final ConfigKey<String> MONGODB_COLLECTION_PREFIX = EnduringKey.wrap(StringKey.of("data.mongodb_collection_prefix", ""));
|
||||
|
||||
|
||||
/**
|
||||
* MongoDB ClientConnectionURI to override default connection options
|
||||
*/
|
||||
public static final ConfigKey<String> MONGODB_CONNECTION_URI = EnduringKey.wrap(StringKey.of("data.mongodb_connection_URI", ""));
|
||||
|
||||
|
||||
/**
|
||||
* The name of the storage method being used
|
||||
*/
|
||||
|
@ -78,19 +78,19 @@ public class MongoDao extends AbstractDao {
|
||||
private MongoClient mongoClient;
|
||||
private MongoDatabase database;
|
||||
private final String prefix;
|
||||
private final String connectionURI;
|
||||
private final String connectionUri;
|
||||
|
||||
public MongoDao(LuckPermsPlugin plugin, StorageCredentials configuration, String prefix, String connectionURI) {
|
||||
public MongoDao(LuckPermsPlugin plugin, StorageCredentials configuration, String prefix, String connectionUri) {
|
||||
super(plugin, "MongoDB");
|
||||
this.configuration = configuration;
|
||||
this.prefix = prefix;
|
||||
this.connectionURI = connectionURI;
|
||||
this.connectionUri = connectionUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
if (!Strings.isNullOrempty(this.connectionURI)) {
|
||||
this.mongoClient = new MongoClient(new MongoClientURI(this.connectionURI));
|
||||
if (!Strings.isNullOrEmpty(this.connectionUri)) {
|
||||
this.mongoClient = new MongoClient(new MongoClientURI(this.connectionUri));
|
||||
} else {
|
||||
MongoCredential credential = null;
|
||||
if (!Strings.isNullOrEmpty(this.configuration.getUsername())) {
|
||||
|
@ -328,7 +328,7 @@ data:
|
||||
# The prefix to use for all LuckPerms collections. Change this if you want to use different
|
||||
# collections for different servers. The default is no prefix.
|
||||
mongodb_collection_prefix: ''
|
||||
|
||||
|
||||
# MongoDB ClientConnectionURI for use with replicasets and custom connection options
|
||||
# See https://docs.mongodb.com/manual/reference/connection-string/
|
||||
mongodb_connection_URI: ''
|
||||
|
@ -277,7 +277,7 @@ data {
|
||||
# The prefix to use for all LuckPerms collections. Change this if you want to use different
|
||||
# collections for different servers. The default is no prefix.
|
||||
mongodb_collection_prefix=""
|
||||
|
||||
|
||||
# MongoDB ClientConnectionURI for use with replicasets and custom connection options
|
||||
# See https://docs.mongodb.com/manual/reference/connection-string/
|
||||
mongodb_connection_URI=""
|
||||
|
Loading…
Reference in New Issue
Block a user