Skip to content

Only set emptyCrystalRespawnAllowed if the fight actually started (fix #14254 regression) - #14333

Open
WouterGritter wants to merge 2 commits into
PaperMC:mainfrom
WouterGritter:fix-dragonfight-regression
Open

WouterGritter wants to merge 2 commits into
PaperMC:mainfrom
WouterGritter:fix-dragonfight-regression

Conversation

@WouterGritter

@WouterGritter WouterGritter commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Fixes regression introduced by #14254

emptyCrystalRespawnAllowed is set to true when an empty crystal collection is given, regardless of if the fight was actually started (this.handle.respawnDragon() may return false). If a fight was already in progress, Bukkit's initiateRespawn() correctly returns false, but the emptyCrystalRespawnAllowed flag will have been set. Eventhough the next fight may be initiated because of something else than CraftDragonBattle.initiateRespawn(emptySet()), it would then still allow the fight to start with no crystals.

This works because vanilla's respawnCrystals.isEmpty() check which the previous PR amended with && !this.emptyCrystalRespawnAllowed only occurs on the next tick after handle.respawnDragon(), though I do wonder if it's cleaner to make vanilla's respawnDragon consume the emptyCrystalRespawnAllowed flag instead, only actually setting it for this fight if the dragon was able to respawn. That's a larger diff, though.

@WouterGritter
WouterGritter requested a review from a team as a code owner October 2, 2026 14:03
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Oct 2, 2026
@Warriorrrr Warriorrrr added type: bug Something doesn't work as it was intended to. scope: api labels Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: api type: bug Something doesn't work as it was intended to.

Projects

Status: Delayed approval

Development

Successfully merging this pull request may close these issues.

2 participants