Player-Ability-Lib-Forge
by trinsdar
Player-Ability-Lib-Forge is a library that manages the player abilities used by other mods, such as flight, so they do not conflict when several mods change them.
What it does
Several mods change the same player abilities, and when they do not coordinate, flight and similar settings can break in subtle ways. This library sits between those mods and the PlayerAbilities class, giving them one shared way to touch abilities. Item and potion toggles are supported, so a mod can grant or remove an ability through either source and the library keeps track of the result.
The project is a port of the PlayerAbilityLib work by PyrofabTheModsmiths to Forge and NeoForge, with some API design credited to Chloe Dawn. The author asks mod developers to use the library wherever their code touches PlayerAbilities, and states that incompatibilities of this kind are more common than most developers expect. Several usage examples are included in the Test mod that is part of the project.
Player-Ability-Lib-Forge is client and server, so the server and every player need it. Builds exist for 1.18.2, 1.19.2, 1.20.1, 1.20.6, 1.21 and 1.21.1 on Forge and NeoForge, and the code is released under the GNU Lesser General Public License v3.0 only, making it open source. The source code and issue tracker are public.
Key features
Shared ability handling
Mods that change player abilities route the changes through one library, which reduces conflicts between them.
Item-based toggles
An ability can be switched on or off through an item, and the library tracks the state.
Potion-based toggles
An ability can also be toggled through a potion effect, using the same tracking.
Usage examples
A Test mod ships with the project and shows how other developers can call the library.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Who it’s for: Mod developers who change player abilities such as flight, and players who run several of those mods on the same server.
Questions
Does Player-Ability-Lib-Forge need to be on both sides?
Which loaders does Player-Ability-Lib-Forge support?
Which game versions have files?
In the catalog
Player-Ability-Lib-Forge is one of 3,514 Library mods on ModsFinder, and one of 1,576 Library mods for Forge. 32,366 mods support Minecraft 1.21.1.
More from trinsdar
Similar mods
What the author says
This a port of PyrofabTheModsmiths' project PlayerAbilityLib to forge/neoforge Have you ever had an issue with a flight charm that stopped working as soon as you ran a /fly command? Or a magic jetpack that made spectators sink through the ground? Or a ghost mode that didn't let you fly for seemingly no reason?
Official listing
- Modrinth page
- modrinth.com/mod/player-ability-lib-forge
- Owner
- trinsdar
- Published
- 2024-09-09
- Updated on Modrinth
- 2024-09-29
- Facts verified
- 2026-10-15