mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-10-30 23:39:33 +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 {
|
public static boolean parse(String s, PermissionHolder holder, Tristate tristate) throws IllegalArgumentException {
|
||||||
try {
|
try {
|
||||||
String expression = generateExpression(s, s1 -> holder.hasPermission(NodeFactory.fromSerialisedNode(s1, true)) == tristate);
|
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();
|
String result = SCRIPT_ENGINE.eval(expression).toString();
|
||||||
|
|
||||||
if (!result.equals("true") && !result.equals("false")) {
|
if (!result.equals("true") && !result.equals("false")) {
|
||||||
|
@ -118,7 +118,7 @@ class SpongeConfig extends AbstractConfiguration<LPSpongePlugin> {
|
|||||||
return def;
|
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")
|
@SuppressWarnings("unchecked")
|
||||||
|
Loading…
Reference in New Issue
Block a user