feat: add PlayerMaxManaChangeEvent - #1780
Merged
Merged
Conversation
Split out of #1677 (piece 7 of 8). Fires a new PlayerMaxManaChangeEvent after Fabled computes a player's max mana (including class bonuses and attribute scaling), letting other plugins apply additional flat bonuses via setMaxMana() before it's applied. The result is clamped to a minimum of 0.
Open
Covers that updatePlayerStat() fires PlayerMaxManaChangeEvent, that a listener's setMaxMana() bonus is reflected in the player's final max mana, and that a listener setting a negative value is clamped to 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #1677 (piece 7 of 8 — see that PR for the full breakdown).
What
Fires a new
PlayerMaxManaChangeEventafter Fabled computes a player's max mana (including class bonuses and attribute scaling), letting other plugins apply additional flat bonuses viasetMaxMana()before it's applied. The result is clamped to a minimum of 0.Why split out separately
Small, additive, self-contained API surface — a new event class plus one call site. No dependency on any other piece of #1677.
Testing
Could not build locally (private Maven repo unreachable in this sandbox). Needs manual/CI verification that max mana still computes correctly with no listeners attached, and that a listener calling
setMaxMana()takes effect.Generated by Claude Code