Repository navigation
Persist Explosive Shot cooldown in SQL database - #5345
Open
cyrne1-7208 wants to merge 1 commit into
Open
cyrne1-7208 wants to merge 1 commit into
cyrne1-7208 wants to merge 1 commit into
Conversation
cyrne1-7208
marked this pull request as draft
October 8, 2026 03:52
updateCooldowns() never wrote the archery column, although loadFromResult() reads it into EXPLOSIVE_SHOT and the FlatFile database stores it. Explosive Shot cannot be activated yet, so players are not affected; the cooldown was only lost when a plugin set it through AbilityAPI. The new test saves a distinct cooldown for every ability and checks each one after reloading, so a missing column fails it on both MySQL and MariaDB. Signed-off-by: Cyrne1_7208 <127477265+cyrne1-7208@users.noreply.github.com>
cyrne1-7208
force-pushed
the
fix/sql-cooldown-persistence-and-leaks
branch
from
October 8, 2026 05:19
5d26a3b to
7d70d03
Compare
cyrne1-7208
marked this pull request as ready for review
October 8, 2026 05:27
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.
Summary
SQLDatabaseManager.updateCooldowns()never wrote thearcherycolumn, althoughloadFromResult()reads it intoEXPLOSIVE_SHOTand the FlatFile database stores it. Explosive Shot cannot be activated yet, so players are not affected today; the cooldown is only lost when a plugin sets it throughAbilityAPI, or once the ability is implemented.I compared every column
saveUser()writes with what the load query reads, andarcherywas the only one missing.Changes
archery = ?inupdateCooldowns()and bindEXPLOSIVE_SHOTin column order.whenSavingUserShouldPersistEveryAbilityCooldown, which saves a distinct cooldown for everySuperAbilityTypeand checks each one after reloading, on MySQL and MariaDB.Testing
mvn test -Psql-tests: all 2,207 tests pass.EXPLOSIVE_SHOT.