@Override
    public TristateResult hasPermission(String permission) {
        if (this.needsRefresh.compareAndSet(true, false)) {
            refresh();
        }
        return this.childPermissions.getOrDefault(permission, TristateResult.UNDEFINED);
    }
Permission Processor for Nukkits "child" permission system.
nukkit/src/main/java/me/lucko/luckperms/nukkit/calculator/ChildProcessor.java