mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Merge pull request #2426 from zreed/master
Empty constructors don't take arguments Sure why not.
This commit is contained in:
commit
342c37a02c
@ -44,7 +44,7 @@ public class DatabaseManagerFactory {
|
|||||||
*/
|
*/
|
||||||
public static void setCustomDatabaseManagerClass(Class<? extends DatabaseManager> clazz) {
|
public static void setCustomDatabaseManagerClass(Class<? extends DatabaseManager> clazz) {
|
||||||
try {
|
try {
|
||||||
clazz.getConstructor((Class<?>) null);
|
clazz.getConstructor();
|
||||||
customManager = clazz;
|
customManager = clazz;
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
@ -78,10 +78,10 @@ public class DatabaseManagerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static DatabaseManager createDefaultCustomDatabaseManager() throws Throwable {
|
public static DatabaseManager createDefaultCustomDatabaseManager() throws Throwable {
|
||||||
return customManager.getConstructor((Class<?>) null).newInstance((Object[]) null);
|
return customManager.getConstructor().newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DatabaseManager createCustomDatabaseManager(Class<? extends DatabaseManager> clazz) throws Throwable {
|
public static DatabaseManager createCustomDatabaseManager(Class<? extends DatabaseManager> clazz) throws Throwable {
|
||||||
return clazz.getConstructor((Class<?>) null).newInstance((Object[]) null);
|
return clazz.getConstructor().newInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user