mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Fix issues with default assignment loading on Sponge
This commit is contained in:
parent
1db777cd31
commit
c99d6556db
@ -38,6 +38,9 @@ public class LogicParser {
|
||||
public static boolean parse(String s, PermissionHolder holder, Tristate tristate) throws IllegalArgumentException {
|
||||
try {
|
||||
String expression = generateExpression(s, s1 -> holder.hasPermission(NodeFactory.fromSerialisedNode(s1, true)) == tristate);
|
||||
if (SCRIPT_ENGINE == null) {
|
||||
throw new NullPointerException("script engine");
|
||||
}
|
||||
String result = SCRIPT_ENGINE.eval(expression).toString();
|
||||
|
||||
if (!result.equals("true") && !result.equals("false")) {
|
||||
|
@ -118,7 +118,7 @@ class SpongeConfig extends AbstractConfiguration<LPSpongePlugin> {
|
||||
return def;
|
||||
}
|
||||
|
||||
return node.getChildrenList().stream().map(n -> (String) n.getKey()).collect(Collectors.toList());
|
||||
return node.getChildrenMap().keySet().stream().map(Object::toString).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Loading…
Reference in New Issue
Block a user