Started SQLite work

This commit is contained in:
[email protected] authored and William278 committed 2020-12-07 22:56:33 +00:00
1 parent d3a787be67
commit 559e38fc4b
21 files changed
+788 -65

No files matched your search

@@ -0,0 +1,32 @@
package me.william278.huskhomes2;
import me.william278.huskhomes2.Data.SQLite.Database;
import me.william278.huskhomes2.Data.SQLite.SQLite;
import org.bukkit.Bukkit;
// This class handles the saving of data; whether that be through SQLite or SQL
public class dataManager {
private static Database sqliteDatabase;
private static void initializeSQLite() {
sqliteDatabase = new SQLite(Main.getInstance());
sqliteDatabase.load();
}
private static void initializeMySQL() {
}
public static void setupStorage(String storageType) {
if (storageType.toLowerCase().equals("sqlite")) {
initializeSQLite();
} else if (storageType.toLowerCase().equals("mysql")) {
initializeMySQL();
} else {
Bukkit.getLogger().warning("Invalid storage method set in config.yml; defaulting to SQLite");
initializeSQLite();
}
}
}