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..`
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
Plugin and Datapack List
AdvancedBan, AntiPopup, CTF, LibsDisguises, LuckPerms, ProtocolLib
Paper version
1.19.4
Other
No response