Fix issues with default assignment loading on Sponge

This commit is contained in:
Luck 2017-01-18 21:37:41 +00:00
parent 1db777cd31
commit c99d6556db
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 1 deletions

View File

@ -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")) {

View File

@ -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")