Made Config use ConfigHandler instead of FlatFileDatabaseHandler

This commit is contained in:
Florian CUNY 2018-08-06 15:59:38 +02:00
parent 7f0dc2f6d3
commit e22cdf0b36
2 changed files with 3 additions and 4 deletions

View File

@ -24,12 +24,12 @@ public class Config<T> {
public Config(BentoBox plugin, Class<T> type) {
this.logger = plugin.getLogger();
handler = new FlatFileDatabase().getHandler(type);
handler = new FlatFileDatabase().getConfig(type);
}
public Config(Addon addon, Class<T> type) {
this.logger = addon.getLogger();
handler = new FlatFileDatabase().getHandler(type);
handler = new FlatFileDatabase().getConfig(type);
}
/**
@ -53,7 +53,6 @@ public class Config<T> {
* @return the object or null if it cannot be loaded
*/
public T loadConfigObject(String uniqueId) {
try {
return handler.loadObject(uniqueId);
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException

View File

@ -7,7 +7,7 @@ import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.database.DatabaseConnector;
/**
* Class handles config settings saving and loading
* Handles config settings saving and loading.
*
* @author tastybento
*