[SPIGOT-7979] PlayerInteractEvent does not fire in Adventure mode for LEFT_CLICK_BLOCK actions Created: 12/Dec/24 Updated: 25/Dec/24 Resolved: 14/Dec/24 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Kevin Cranmer | Assignee: | md_5 |
Resolution: | Fixed | Votes: | 0 |
Labels: | API, bug, event, spigot | ||
Environment: |
Tested on Spigot 1.20.4-1.21.4 running a local server. Provided plugin is for 1.20.4 |
Attachments: |
![]() |
Version: | 4053-Spigot-e9ec548-98b6c1a (MC: 1.20.4) |
Guidelines Read: | Yes |
Description |
The 'PlayerInteractEvent' does not fire if all of the following is true:
I would expect the event to fire with an action value of LEFT_CLICK_BLOCK, which is the case if the player is in survival mode. Other notes:
This may be intended behavior but it feels incorrect, so feel free to tell me "no".
Provided a sample plugin that sets your gamemode to adventure and listens for the PlayerInteractEvent so you can verify that punching a block in adventure mode does not trigger the PlayerInteractEvent. Switch back to survival mode and you can see that punching a block does not trigger the event. |