-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
-
None
-
None
ProjectileHitEvent can now already return the hit entity if there is one.
This ticket is asking for the similar addition of #getHitBlock(), which would return the hit block, or otherwise null if no block was hit (similar to how getHitEntity works).
Minecraft is already determining the hit block for every projectile hit (as far as I can tell). Passing this to plugins via the event would allow them to not have to manually determine the hit block themselves, which potentially involves each plugin having to perform the necessary ray cast again.
Ticket https://hub.spigotmc.org/jira/browse/SPIGOT-911 is asking for a similar addition, but for arrows only.
- duplicates
-
SPIGOT-911 ArrowHitBlockEvent
- Resolved