Minecraft.How
Loading...
Skip to content

PlayerAbilityLib

by Pyrofab

A server-side library for Fabric and Quilt that prevents conflicts when multiple mods modify player abilities like flight.

Our summary

What this project does

What it does PlayerAbilityLib solves a specific problem: when two mods try to change the same player ability, one overwrites the other. A flight charm stops working when you run a /fly command. A jetpack makes spectators sink through the ground. Ghost mode refuses to let you fly for no obvious reason. These conflicts happen because mods write directly to the PlayerAbilities class without coordinating. This library gives every mod a named ability source. It tracks which source granted which ability and only applies the final result when all sources agree. The result is that a flight charm and a /fly command can coexist. ## Who it is for This isn't a mod you install as a player. It's a dependency that other mods embed in their own jar files. If you're a player and you see ability conflicts, you can point the mod author to this library. If you're a developer writing a Fabric or Quilt mod that touches player abilities, you add it as a Gradle dependency and use the AbilitySource API to grant or revoke abilities. ## How it works You create an AbilitySource with a mod identifier and a name. Then you call grantTo or revokeFrom on that source for a specific ability like ALLOW_FLYING. The library aggregates all sources and updates the actual PlayerAbilities instance once. Read access to PlayerAbilities still works directly on both client and server. Write access through the library is server-side only. No synchronization is performed on ability sources. If you need to sync complex data to the client, the README suggests Cardinal Components API. ## Compatibility The library supports Fabric and Quilt. It runs on Minecraft versions 26.1, 1.21.9, 1.21.6, 1.21.5, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, and 1.20. It's licensed under LGPL v3.0 only. The server side is required. The client side is unsupported. The latest repository release is v1.16.0 which added support for version 26.1.

Reactions

Log in to react.

Compatibility

Versions and loaders

8 releases on record

Gallery

PlayerAbilityLib icon

We use cookies to improve your experience. By continuing to use this site, you agree to our use of cookies. Read our Privacy Policy