mirror of
https://github.com/xHyroM/lighteco.git
synced 2024-12-22 12:31:05 +01:00
feat: select storage provider from config
This commit is contained in:
parent
4f988b53d2
commit
314d41f287
2 changed files with 5 additions and 1 deletions
|
@ -11,4 +11,8 @@ public class Config extends OkaeriConfig {
|
|||
@Comment("If you have multiple servers, you must set this property to a different value for each server.")
|
||||
@Comment("Used for local currencies.")
|
||||
public String server = "none";
|
||||
|
||||
@Comment("The storage provider to use.")
|
||||
@Comment("Supported providers: memory")
|
||||
public String storage = "memory";
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public class StorageFactory {
|
|||
|
||||
public Storage get() {
|
||||
// todo: use config
|
||||
String provider = "memory";//this.plugin.getConfig().getString("storage.provider");
|
||||
String provider = this.plugin.getConfig().get("storage", String.class);
|
||||
|
||||
return new Storage(this.plugin, createProvider(provider));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue