Skip to content

PlayerInteractEvent and Action.LEFT_CLICK_AIR does not trigger #10330

@N0rth88

Description

@N0rth88

Expected behavior

It is necessary that the event is successfully fired and the spectators do not prevent it

Observed/Actual behavior

PlayerInteractEvent and Action.LEFT_CLICK_AIR does not trigger when a player presses the Light Mouse Click while another player in spectator mode is in the direction of his gaze. This event is not called.
This problem did not occur on spigot 1.16.5

Steps/models to reproduce

@EventHandler private void openMenu(PlayerInteractEvent e) { if (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK) { if (e.getHand() == EquipmentSlot.HAND) { Player p = e.getPlayer(); if (p.getGameMode().equals(GameMode.SURVIVAL)) { if (ClassesGui.getBlueNecromant().contains(p.getName()) || ClassesGui.getRedNecromant().contains(p.getName())) { if (p.getInventory().getItemInMainHand().getType() == Material.BOOK) { //code..

Plugin and Datapack List

AdvancedBan, AntiPopup, CTF, LibsDisguises, LuckPerms, ProtocolLib

Paper version

1.19.4

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: cannot reproducePaper team is unable to replicate the issue.type: bugSomething doesn't work as it was intended to.

    Type

    No fields configured for Bug.

    Projects

    Status

    Invalid

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions