mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-14 20:31:48 +01:00
Fix compatibility with older Gson versions
This commit is contained in:
parent
a5e41e479a
commit
bbb2897d20
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user