Download Metadata Wildcard for fabric-permissions-api — Minecraft Mods — ModStock

Metadata Wildcard for fabric-permissions-api

Active

Downloads

0

Last update

1 month ago

Versions

1.16.5 — 1.21.8
Server
Fabric
Libraries
Control
Utils

Metadata Wildcard for fabric-permissions-api

GitHub commit activity GitHub commits since latest release GitHub contributors GitHub Created At GitHub last commit GitHub top language GitHub Actions Workflow Status GitHub branch check runs GitHub Downloads (all assets, all releases) GitHub Sponsors GitHub Issues or Pull Requests GitHub Issues or Pull Requests GitHub Discussions Modrinth Game Versions GitHub code size in bytes GitHub repo file or directory count GitHub repo size GitHub followers GitHub forks GitHub User's stars Modrinth Followers GitHub Release

LuckPerms supports wildcard permissions:

lp user <username> permission set luckperms.* true

But lacks wildcard support for metadata:

lp user <username> meta set some.mod.need.metadata.* 69

This fabric-permissions-api addon enables wildcard metadata resolution for any mod using the permissions API.

Synopsis

This mod works like when apply-wildcards= true and apply-sponge-default-subjects= false

Download

Maven Central

GitHub Packages

Modrinth

Requirement

Usage

For players

  1. Install the mod in your mod directory
  2. Start your game/server once to generate config
  3. Edit config/MetadataWildcard4fabric-permissions-api/prefix.txt

Default config:

minecraft.selector

When checking a key like minecraft.selector.foo.bar:

  1. First checks for an exact match
  2. If not found, checks parent keys with wildcards in descending order:
    • minecraft.selector.foo.*
    • minecraft.selector.*
  3. Returns unset if no match is found

For modders

Add dependency in build.gradle:

// Optional dependency (users install manually)
modImplementation("top.qwertycxz:metadatawildcard4fabric-permissions-api:0.0.1")

// OR bundle with your mod
include(modImplementation("top.qwertycxz:metadatawildcard4fabric-permissions-api:0.0.1"))

Runtime Configuration

MetadataWildcard.prefixStrings.add("your.mod.metadata.prefix");

Equivalent to adding your.mod.metadata.prefix in prefix.txt.

Contributor

@qwertycxz

How could I contribute?

Issue and Pull-requests are both welcomed.

License

Apache 2.0 © qwertycxz

Project members
qwertycxz

qwertycxz

Developer