Avoid calls to the Bukkit singleton

This commit is contained in:
Luck committed 2020-04-07 17:50:08 +01:00
1 parent 54aed80db8
commit 8cecfe5b7c
6 files changed
+28 -40

No files matched your search

@@ -82,18 +82,13 @@ public class StorageFactory {
} else {
StorageType type = this.plugin.getConfiguration().get(ConfigKeys.STORAGE_METHOD);
this.plugin.getLogger().info("Loading storage provider... [" + type.name() + "]");
storage = makeInstance(type);
storage = new Storage(this.plugin, createNewImplementation(type));
}
storage.init();
return storage;
}
private Storage makeInstance(StorageType type) {
// make a base implementation
return new Storage(this.plugin, createNewImplementation(type));
}
private StorageImplementation createNewImplementation(StorageType method) {
switch (method) {
case CUSTOM: