Skip to content

Apply VehicleDamageEvent.getDamage() for boats - #192

Merged
windcolor-dev merged 6 commits into
Wind-Development:masterfrom
xii69:fix/boat-vehicle-damage-event
Oct 22, 2026
Merged

windcolor-dev merged 6 commits into
Wind-Development:masterfrom
xii69:fix/boat-vehicle-damage-event

Conversation

@xii69

@xii69 xii69 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What was wrong

Boats already fired VehicleDamageEvent and respected cancel, but event.getDamage() was commented out with “TODO Why don't we do this?”. Plugins calling setDamage() had no effect on boats. Minecarts already applied the event damage.

What this changes

After the cancel check, apply f = (float) event.getDamage() — same pattern as minecarts. Cancel still returns early with no damage.

Why this is needed

If we fire the event, plugins should be able to change the damage. Leaving that line commented makes the API lie for boats only.

Testing

VehicleDamageEventBoatParityTest 3/3; server tests green; package OK.

cursoragent and others added 5 commits October 13, 2026 18:58
EntityBoat honored cancel but ignored event.getDamage(), so plugins
could not change boat damage. Apply the event damage the same way
EntityMinecartAbstract already does.

Co-authored-by: xii69 <xii69@yahoo.com>
Co-authored-by: xii69 <xii69@yahoo.com>
@cursor
cursor Bot force-pushed the fix/boat-vehicle-damage-event branch from 2addb93 to 708f370 Compare October 14, 2026 21:11
Correct "Apply VehicleDamageEvent.getDamage() for boats"
@windcolor-dev
windcolor-dev merged commit ce0025d into Wind-Development:master Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants