mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-19 22:51:23 +01:00
Reverted to using an explicit throw of all exceptions
This commit is contained in:
parent
e4fbc6fab1
commit
08b2e2579b
@ -39,13 +39,13 @@ public interface ISettings<T> {
|
|||||||
|
|
||||||
// --------------- Loader ------------------
|
// --------------- Loader ------------------
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
default T loadSettings() throws Exception {
|
default T loadSettings() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, ClassNotFoundException, IntrospectionException, SQLException {
|
||||||
// See if this settings object already exists in the database
|
// See if this settings object already exists in the database
|
||||||
AbstractDatabaseHandler<T> dbhandler = (AbstractDatabaseHandler<T>) BSBDatabase.getDatabase().getHandler(this.getClass());
|
AbstractDatabaseHandler<T> dbhandler = (AbstractDatabaseHandler<T>) BSBDatabase.getDatabase().getHandler(this.getClass());
|
||||||
T dbConfig = null;
|
T dbConfig = null;
|
||||||
if (dbhandler.objectExits(this.getUniqueId())) {
|
if (dbhandler.objectExits(this.getUniqueId())) {
|
||||||
// Load it
|
// Load it
|
||||||
dbConfig = dbhandler.loadObject(getUniqueId());
|
dbConfig = dbhandler.loadObject(getUniqueId());
|
||||||
}
|
}
|
||||||
// Get the handler
|
// Get the handler
|
||||||
AbstractDatabaseHandler<T> configHandler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(getInstance().getClass());
|
AbstractDatabaseHandler<T> configHandler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(getInstance().getClass());
|
||||||
|
Loading…
Reference in New Issue
Block a user