Mode storage refactoring - write group nodes into their own section in flatfile types (#502)
This commit is contained in:
+7
-7
@@ -36,7 +36,7 @@ import com.google.gson.JsonObject;
|
||||
|
||||
import me.lucko.luckperms.api.context.ImmutableContextSet;
|
||||
import me.lucko.luckperms.common.contexts.ContextSetComparator;
|
||||
import me.lucko.luckperms.common.node.NodeModel;
|
||||
import me.lucko.luckperms.common.contexts.ContextSetJsonSerializer;
|
||||
import me.lucko.luckperms.common.node.NodeWithContextComparator;
|
||||
import me.lucko.luckperms.sponge.service.calculated.CalculatedSubjectData;
|
||||
import me.lucko.luckperms.sponge.service.model.LPPermissionService;
|
||||
@@ -107,7 +107,7 @@ public class SubjectStorageModel {
|
||||
JsonObject context = section.get("context").getAsJsonObject();
|
||||
JsonObject data = section.get("data").getAsJsonObject();
|
||||
|
||||
ImmutableContextSet contextSet = NodeModel.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableContextSet contextSet = ContextSetJsonSerializer.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableMap.Builder<String, Boolean> perms = ImmutableMap.builder();
|
||||
for (Map.Entry<String, JsonElement> perm : data.entrySet()) {
|
||||
perms.put(perm.getKey(), perm.getValue().getAsBoolean());
|
||||
@@ -130,7 +130,7 @@ public class SubjectStorageModel {
|
||||
JsonObject context = section.get("context").getAsJsonObject();
|
||||
JsonObject data = section.get("data").getAsJsonObject();
|
||||
|
||||
ImmutableContextSet contextSet = NodeModel.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableContextSet contextSet = ContextSetJsonSerializer.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableMap.Builder<String, String> opts = ImmutableMap.builder();
|
||||
for (Map.Entry<String, JsonElement> opt : data.entrySet()) {
|
||||
opts.put(opt.getKey(), opt.getValue().getAsString());
|
||||
@@ -153,7 +153,7 @@ public class SubjectStorageModel {
|
||||
JsonObject context = section.get("context").getAsJsonObject();
|
||||
JsonArray data = section.get("data").getAsJsonArray();
|
||||
|
||||
ImmutableContextSet contextSet = NodeModel.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableContextSet contextSet = ContextSetJsonSerializer.deserializeContextSet(context).makeImmutable();
|
||||
ImmutableList.Builder<SubjectReference> pars = ImmutableList.builder();
|
||||
for (JsonElement p : data) {
|
||||
if (!p.isJsonObject()) {
|
||||
@@ -189,7 +189,7 @@ public class SubjectStorageModel {
|
||||
}
|
||||
|
||||
JsonObject section = new JsonObject();
|
||||
section.add("context", NodeModel.serializeContextSet(e.getKey()));
|
||||
section.add("context", ContextSetJsonSerializer.serializeContextSet(e.getKey()));
|
||||
|
||||
JsonObject data = new JsonObject();
|
||||
|
||||
@@ -213,7 +213,7 @@ public class SubjectStorageModel {
|
||||
}
|
||||
|
||||
JsonObject section = new JsonObject();
|
||||
section.add("context", NodeModel.serializeContextSet(e.getKey()));
|
||||
section.add("context", ContextSetJsonSerializer.serializeContextSet(e.getKey()));
|
||||
|
||||
JsonObject data = new JsonObject();
|
||||
|
||||
@@ -237,7 +237,7 @@ public class SubjectStorageModel {
|
||||
}
|
||||
|
||||
JsonObject section = new JsonObject();
|
||||
section.add("context", NodeModel.serializeContextSet(e.getKey()));
|
||||
section.add("context", ContextSetJsonSerializer.serializeContextSet(e.getKey()));
|
||||
|
||||
JsonArray data = new JsonArray();
|
||||
for (SubjectReference ref : e.getValue()) {
|
||||
|
||||
Reference in New Issue
Block a user