1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-24 21:11:41 +02:00

Fix incorrectly reading node value from the value field when reading from the flatfile meta section (#2312)

This commit is contained in:
Luck
2020-05-20 18:21:49 +01:00
parent ed85ab1bfd
commit ea5a05d770

View File

@@ -474,13 +474,11 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
}
private static Node readMetaAttributes(ConfigurationNode attributes, Function<ConfigurationNode, NodeBuilder<?, ?>> permissionFunction) {
boolean value = attributes.getNode("value").getBoolean(true);
long expiryVal = attributes.getNode("expiry").getLong(0L);
Instant expiry = expiryVal == 0L ? null : Instant.ofEpochSecond(expiryVal);
ImmutableContextSet context = readContexts(attributes);
return permissionFunction.apply(attributes)
.value(value)
.expiry(expiry)
.context(context)
.build();