PermissionHolder.java 文件源码

java
阅读 34 收藏 0 点赞 0 评论 0

项目:LuckPerms 作者:
/**
 * Unsets a transient permission node
 *
 * @param node the node to unset
 */
public DataMutateResult unsetTransientPermission(Node node) {
    if (hasPermission(node, true) == Tristate.UNDEFINED) {
        return DataMutateResult.LACKS;
    }

    ImmutableCollection<Node> before = getTransientNodes().values();

    this.transientNodesLock.lock();
    try {
        this.transientNodes.get(node.getFullContexts().makeImmutable()).removeIf(e -> e.almostEquals(node));
    } finally {
        this.transientNodesLock.unlock();
    }

    invalidateCache();

    ImmutableCollection<Node> after = getTransientNodes().values();
    this.plugin.getEventFactory().handleNodeRemove(node, this, before, after);
    return DataMutateResult.SUCCESS;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号