Add sqlite support

This commit is contained in:
Luck
2016-06-22 16:47:54 +01:00
Unverified
parent f6d8fb5286
commit 60f6bac903
15 changed files with 301 additions and 188 deletions
@@ -9,5 +9,6 @@ public interface LPConfiguration {
String getDefaultGroupName();
boolean getIncludeGlobalPerms();
String getDatabaseValue(String value);
String getStorageMethod();
}
@@ -1,6 +1,5 @@
package me.lucko.luckperms.utils;
import com.google.gson.reflect.TypeToken;
import lombok.Getter;
import lombok.Setter;
import me.lucko.luckperms.LuckPermsPlugin;
@@ -260,20 +259,4 @@ public abstract class PermissionObject {
return perms;
}
/**
* Loads serialised nodes into the object
* @param json The json data to be loaded
*/
public void loadNodes(String json) {
nodes.putAll(plugin.getGson().fromJson(json, new TypeToken<Map<String, Boolean>>(){}.getType()));
}
/**
* Serialize the nodes in the object to be saved in the datastore
* @return A json string
*/
public String serializeNodes() {
return plugin.getGson().toJson(nodes);
}
}