mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-25 18:48:15 +01:00
Made each DatabaseConnectors's constructors package-private
This commit is contained in:
parent
bf506a49b2
commit
5b97d16a2d
@ -13,7 +13,7 @@ public class JSONDatabaseConnector implements DatabaseConnector {
|
||||
private static final String JSON = ".json";
|
||||
private final File dataFolder;
|
||||
|
||||
public JSONDatabaseConnector(BentoBox plugin) {
|
||||
JSONDatabaseConnector(BentoBox plugin) {
|
||||
dataFolder = new File(plugin.getDataFolder(), DATABASE_FOLDER_NAME);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class MongoDBDatabaseConnector implements DatabaseConnector {
|
||||
* Class for MySQL database connections using the settings provided
|
||||
* @param dbSettings - database settings
|
||||
*/
|
||||
public MongoDBDatabaseConnector(DatabaseConnectionSettingsImpl dbSettings) {
|
||||
MongoDBDatabaseConnector(DatabaseConnectionSettingsImpl dbSettings) {
|
||||
this.dbSettings = dbSettings;
|
||||
MongoCredential credential = MongoCredential.createCredential(dbSettings.getUsername(),
|
||||
dbSettings.getDatabaseName(),
|
||||
|
@ -19,7 +19,7 @@ public class MySQLDatabaseConnector implements DatabaseConnector {
|
||||
* Class for MySQL database connections using the settings provided
|
||||
* @param dbSettings - database settings
|
||||
*/
|
||||
public MySQLDatabaseConnector(DatabaseConnectionSettingsImpl dbSettings) {
|
||||
MySQLDatabaseConnector(DatabaseConnectionSettingsImpl dbSettings) {
|
||||
this.dbSettings = dbSettings;
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver").getDeclaredConstructor().newInstance();
|
||||
|
@ -29,8 +29,7 @@ public class YamlDatabaseConnector implements DatabaseConnector {
|
||||
private final BentoBox plugin;
|
||||
private final File dataFolder;
|
||||
|
||||
|
||||
public YamlDatabaseConnector(BentoBox plugin) {
|
||||
YamlDatabaseConnector(BentoBox plugin) {
|
||||
this.plugin = plugin;
|
||||
dataFolder = new File(plugin.getDataFolder(), DATABASE_FOLDER_NAME);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user