mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-09 13:50:52 +02:00
Accept empty contexts.json file as valid
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user