Update default storageprovider to YAML.
This commit is contained in:
parent
6a0fdbbc1e
commit
52e51f99da
|
|
@ -242,7 +242,7 @@ public class Config {
|
||||||
FEED_BY_OTHER = getString("messages.command.feed.feed-by-other", FEED_BY_OTHER);
|
FEED_BY_OTHER = getString("messages.command.feed.feed-by-other", FEED_BY_OTHER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String STORAGE_TYPE = "mysql";
|
public static String STORAGE_TYPE = "YAML";
|
||||||
public static boolean AUTO_SAVE = true;
|
public static boolean AUTO_SAVE = true;
|
||||||
public static int AUTO_SAVE_DELAY = 60;
|
public static int AUTO_SAVE_DELAY = 60;
|
||||||
public static String MYSQL_IP = "localhost";
|
public static String MYSQL_IP = "localhost";
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.alttd.essentia.storage;
|
||||||
|
|
||||||
import com.alttd.essentia.EssentiaPlugin;
|
import com.alttd.essentia.EssentiaPlugin;
|
||||||
import com.alttd.essentia.storage.mysql.SQLStorageProvider;
|
import com.alttd.essentia.storage.mysql.SQLStorageProvider;
|
||||||
|
import com.alttd.essentia.storage.sqlite.SQLiteStorageProvider;
|
||||||
import com.alttd.essentia.storage.yaml.YamlStorageProvider;
|
import com.alttd.essentia.storage.yaml.YamlStorageProvider;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
@ -16,9 +17,10 @@ public class StorageManager {
|
||||||
|
|
||||||
public StorageProvider storageProvider(StorageType type) {
|
public StorageProvider storageProvider(StorageType type) {
|
||||||
return switch (type) {
|
return switch (type) {
|
||||||
case MYSQL -> new SQLStorageProvider(plugin);
|
// case MYSQL -> new SQLStorageProvider(plugin); // FIXME
|
||||||
case YAML -> new YamlStorageProvider(plugin, plugin.getDataFolder().getPath() + File.separator + "PlayerData");
|
case YAML -> new YamlStorageProvider(plugin, plugin.getDataFolder().getPath() + File.separator + "PlayerData");
|
||||||
case SQLITE -> throw new UnsupportedOperationException(); // FIXME
|
// case SQLITE -> new SQLiteStorageProvider(plugin); // FIXME
|
||||||
|
default -> throw new UnsupportedOperationException();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user