mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-02 06:28:13 +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 ------------------
|
||||
@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
|
||||
AbstractDatabaseHandler<T> dbhandler = (AbstractDatabaseHandler<T>) BSBDatabase.getDatabase().getHandler(this.getClass());
|
||||
T dbConfig = null;
|
||||
if (dbhandler.objectExits(this.getUniqueId())) {
|
||||
// Load it
|
||||
dbConfig = dbhandler.loadObject(getUniqueId());
|
||||
dbConfig = dbhandler.loadObject(getUniqueId());
|
||||
}
|
||||
// Get the handler
|
||||
AbstractDatabaseHandler<T> configHandler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(getInstance().getClass());
|
||||
|
Loading…
Reference in New Issue
Block a user