mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 03:57:39 +01:00
Made Config use ConfigHandler instead of FlatFileDatabaseHandler
This commit is contained in:
parent
7f0dc2f6d3
commit
e22cdf0b36
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user