1
0
Fork 0
mirror of https://github.com/xHyroM/lighteco.git synced 2024-11-10 01:18:07 +01:00

feat: select storage provider from config

This commit is contained in:
Jozef Steinhübl 2023-08-26 16:46:41 +02:00
parent 4f988b53d2
commit 314d41f287
2 changed files with 5 additions and 1 deletions

View file

@ -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";
}

View file

@ -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));
}