Metadata Wildcard for fabric-permissions-api
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-implicit-wildcards= false
Download
Requirement
- Minecraft ⩾ 1.16.5
- Fabric
- fabric-permissions-api ⩾ 0.3.1
- Any permission mod supports fabric-permissions-api (e.g. LuckPerms)
Usage
For players
- Install the mod in your
moddirectory - Start your game/server once to generate config
- Edit
config/MetadataWildcard4fabric-permissions-api/prefix.txt
Default config:
minecraft.selector
When checking a key like minecraft.selector.foo.bar:
- First checks for an exact match
- If not found, checks parent keys with wildcards in descending order:
minecraft.selector.foo.*minecraft.selector.*
- 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
How could I contribute?
Issue and Pull-requests are both welcomed.
License
Apache 2.0 © qwertycxz
No gallery available for this project.
| Version | Minecraft | Loader | Download |
|---|---|---|---|
|
v0.2.0 0.2.0 |
26.1, 26.1.1, 26.1.2, 26.2, 26.3
|
fabric
|
Download |
|
v0.2.0 0.2.0 |
1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
|
fabric
|
Download |
|
v0.1.0 0.1.0 |
26.1, 26.1.1, 26.1.2
|
fabric
|
Download |
|
v0.1.0 0.1.0 |
1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
|
fabric
|
Download |
|
v0.0.2 0.0.2 |
1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
|
fabric
|
Download |