Paper
Paper copied to clipboard
Trident doesn't trigger PlayerLaunchProjectileEvent
Expected behavior
When I charge and release a trident I would expect the event to be triggered.
Observed/Actual behavior
The event doesn't trigger when a player launches a trident.
Steps/models to reproduce
- Charge trident
- Release trident
- No event
Plugin and Datapack List
Custom plugin
Paper version
This server is running Paper version git-Paper-308 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: https://github.com/PaperMC/Paper/commit/5b85ee37e20de15e0798391085b01229e4e0d6fd) You are 2 version(s) behind Download the new version at: https://papermc.io/downloads Previous version: git-Paper-301 (MC: 1.18.2)
Other
ProjectileLaunchEvent does trigger when throwing a trident as a player. However, to listen in on that event for all projectiles is not that efficient when there is a PlayerLaunchProjectileEvent.
I can replicate this :+1: As per API definition of the Trident interface (it implements ThrowableProjectile) is a projectile and the player does launch it, e.g. I would expect the event to fire here. The PR that originally introduced this patch was during a pre-1.13 state of paper and presumably simply missed the trident/maybe the trident did not exist at that stage yet ? (PR)
This is the same for shooting arrows and spectral arrows. I would expect this event to fire as well for those cases. But that might just be me.
https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2
The fact is, this is meant for items that when you "right-click" it "throws" it. But arrows have never been included in this event.