Skip to content

Migrate to Fabric Permissions API - #392

Open
Genau6502 wants to merge 3 commits into
QuiltServerTools:masterfrom
Genau6502:master
Open

Genau6502 wants to merge 3 commits into
QuiltServerTools:masterfrom
Genau6502:master

Conversation

@Genau6502

Copy link
Copy Markdown
Contributor

Implements the Fabric Permissions API v1.

New permissions for commands: ledger:command/<command_full_name>

  • Changes commands to use Fabric Permissions API v1
  • Commands fall back to permission level 3 except for purge which still relies on the config
  • Changed networking base permission to ledger:networking, there remains no fallback (this must be explicitly given instead of via permission level)
  • Updated docs to reflect above
  • Bumped MC version to 26.2 and FAPI to 0.158.0

Closes #377

- Changes commands to use the new fabric permission API
- Changes networking API to use the new fabric permission API
- Removes dependency on lucko's API
- Bump Fabric API to 0.158.0 & Minecraft to 26.2
@Genau6502
Genau6502 requested a review from a team as a code owner August 31, 2026 22:29

@PotatoPresident PotatoPresident left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth mentioning in the docs that luckperms (and potentially other permission systems) covert the namespaced permissions (ledger:x) back to the legacy ledger.x format

Comment thread docs/networking.md

## Versions

All packets are correct for Ledger Networking v3, which is included in Ledger 1.3.0 and later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really add anything

Comment thread docs/networking.md

Each packet also requires the permissions that the corresponding command does, but note that this does have fallback to permission level.

### Permissions prior to version 1.3.24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is unnecessary. Users can just look at old versions of docs

import net.minecraft.server.permissions.PermissionLevel
import java.util.function.Predicate

private const val NAMESPACE = "ledger"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the mod id constant in main Ledger object

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to Fabric Permissions API

2 participants