private @NonNull TriState onPermissionCheck(CommandSource source, String permission) {
        if (source instanceof ServerCommandSource) {
            Entity entity = ((ServerCommandSource) source).getEntity();
            if (entity instanceof ServerPlayerEntity) {
                return playerPermissionCheck((ServerPlayerEntity) entity, permission);
            }
        }
        return otherPermissionCheck(source, permission);
    }
Listener to route permission checks made via fabric-permissions-api to LuckPerms.
fabric/src/main/java/me/lucko/luckperms/fabric/listeners/FabricPermissionsApiListener.java