mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +01:00
Accept empty contexts.json file as valid
This commit is contained in:
parent
d937c9ce06
commit
9f7d431d34
@ -63,6 +63,9 @@ public class ContextsFile {
|
||||
|
||||
try (BufferedReader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) {
|
||||
JsonObject data = GsonProvider.normal().fromJson(reader, JsonObject.class);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.has("static-contexts")) {
|
||||
this.staticContexts = ContextSetJsonSerializer.deserializeContextSet(data.get("static-contexts").getAsJsonObject()).immutableCopy();
|
||||
|
Loading…
Reference in New Issue
Block a user