mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 17:49:47 +00:00
Avoid calls to the Bukkit singleton
This commit is contained in:
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:
|
||||
|
||||
Reference in new issue
Block a user