Fix default assignment expressions checking temporary permissions (#783)

This commit is contained in:
Luck 2018-02-22 23:38:26 +00:00
parent 736105cc12
commit 63ff3c34b3
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -28,6 +28,7 @@ package me.lucko.luckperms.common.assignments;
import com.google.common.collect.ImmutableList;
import me.lucko.luckperms.api.Node;
import me.lucko.luckperms.api.StandardNodeEquality;
import me.lucko.luckperms.api.Tristate;
import me.lucko.luckperms.common.model.PermissionHolder;
import me.lucko.luckperms.common.node.LegacyNodeFactory;
@ -60,7 +61,7 @@ public class AssignmentExpression {
throw new NullPointerException("script engine");
}
Predicate<Node> checker = node -> holder.hasPermission(node) == tristate;
Predicate<Node> checker = node -> holder.hasPermission(node, StandardNodeEquality.IGNORE_VALUE_OR_IF_TEMPORARY) == tristate;
String exp = this.expression.stream().map(t -> t.forExpression(checker)).collect(Collectors.joining())
.replace("&", "&&").replace("|", "||");