[SPIGOT-3074] PlayerInteractEvent is not called for deopped players Created: 18/Feb/17  Updated: 18/Feb/17  Resolved: 18/Feb/17

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Faris Rehman Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: PlayerInteractEvent, Plugins, bug, major


 Description   

When right clicking (interacting), the following code is only called if the player is OP:

@EventHandler
public void onInteract(PlayerInteractEvent event) {
   try {
      System.out.println((new Random()).nextInt());
   } catch (Exception ex) {
      ex.printStackTrace();
   }
}

I have tested with only PlugMan and this code running, and the same issue occurs. What I did notice was when I had PermissionsEx installed, this was broken, but when I unloaded PermissionsEx via PlugMan, it fixed, but then when I stopped the server, disabled PermissionsEx, and started the server, it broke again.

 

PlayerInteractEvent is a vital event for the majority of plugins and thus I have put this as a major bug.



 Comments   
Comment by Faris Rehman [ 18/Feb/17 ]

Weird, I tested it on another test server with the same Spigot version and it works. It definitely didn't work on the first server I tested.

Edit: Turns out the user of my plugin had spawn-protection enabled.

Comment by md_5 [ 18/Feb/17 ]

This is not a spigot bug

Generated at Tue Apr 22 04:20:16 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.