
Metadata Wildcard for fabric-permissions-api
Активный0.0
Установок
0
Последнее обновление
1 месяц назад
Версии
1.16.5 — 1.21.8
Сервер
Fabric
Библиотеки
Управление
Утилиты
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-default-subjects
= false
Download
Requirement
- Java ⩾ 15
- Minecraft ⩾ 1.16.5
- Fabric
- fabric-permissions-api ⩾ 0.3
- Any permission mod supports fabric-permissions-api (e.g. LuckPerms)
Usage
For players
- Install the mod in your
mod
directory - 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