Fix issue with Bukkit attachment permissions never being removed (#991)

This commit is contained in:
Luck
2018-05-13 14:06:05 +01:00
Unverified
parent 5d34661a15
commit a0be1c7c48
6 changed files with 32 additions and 20 deletions
@@ -25,6 +25,8 @@
package me.lucko.luckperms.api;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;
@@ -36,6 +38,18 @@ import javax.annotation.concurrent.Immutable;
@Immutable
public interface LocalizedNode extends Node {
/**
* Returns a predicate which unwraps the localised node parameter before delegating
* the handling to the provided predicate.
*
* @param delegate the delegate predicate.
* @return the composed predicate
* @since 4.3
*/
static Predicate<? super LocalizedNode> composedPredicate(Predicate<Node> delegate) {
return localizedNode -> delegate.test(localizedNode.getNode());
}
/**
* Gets the delegate node
*