diff --git a/common/src/main/java/me/lucko/luckperms/common/contexts/ContextSetJsonSerializer.java b/common/src/main/java/me/lucko/luckperms/common/contexts/ContextSetJsonSerializer.java index b015ef20c..10bd08fc5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/contexts/ContextSetJsonSerializer.java +++ b/common/src/main/java/me/lucko/luckperms/common/contexts/ContextSetJsonSerializer.java @@ -74,7 +74,7 @@ public class ContextSetJsonSerializer { } JsonObject context = gson.fromJson(json, JsonObject.class); - if (context == null || context.size() == 0) { + if (context == null) { return ContextSet.empty(); } @@ -85,7 +85,7 @@ public class ContextSetJsonSerializer { Preconditions.checkArgument(element.isJsonObject()); JsonObject data = element.getAsJsonObject(); - if (data.size() == 0) { + if (data.entrySet().isEmpty()) { return ContextSet.empty(); }