[SPIGOT-7280] Endereye consumption triggers are broken Created: 25/Feb/23  Updated: 25/Dec/24

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

Type: Bug Priority: Minor
Reporter: Brian Fopiano Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 1.19.3, EnderEye, bug, event, spigot, trigger
Environment:

Freshly built spigot from BT.
Freshly compiled jar.
Java 17.0.6 Temurin

Ender eye trigger now happens before I can cancel 

Can confirm this happens outside of my environment as well.

Test: try throwing a stack of 1 Endereye's 
then try throwing a stack of 2 or more. 
You cant cancel the first one / get any data on it as it was used before you could access it.

ender pearls are working normally


Version: 3661
Plugin: Not Applicable
Guidelines Read: Yes

 Description   

Here is the situation:
Im trying to check when a player right clicks an Ender_Eye (and check if it has my custom data and all that)

And let me preface that I'm not a new developer or anything, I just want to ensure nothing has changed from 1.19.2-1.19.3 that I'm not heretical about.

  • I can trigger my event to see whats in my hands (interact event, left click) and i get the following:
    PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_EYE x 1}

     (offhand, main hand) which is correct, the main hand contains an endereye

 

  • i can trigger the same with a different consumable like an enderpearl and get the following:
    PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_PEARL x 1} 

    (also correct)

 

Here is where the issue is:
I spend the ender pearl (right click / trigger its throw)
Ender pearl: 

PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_PEARL x 1} 

(this reflects the pearl)

Endereye:  

PlayerInteractEventItemStack{AIR x 0} ItemStack{AIR x 0}

(this SHOULD) reflect the ender eye, but it does not.

 

This is my check as a snippet: so you can see what im replicating:

@EventHandler
    public void on(PlayerInteractEvent e) {
        Plugin.info("PlayerInteractEvent" + e.getPlayer().getInventory().getItemInOffHand() + " " + e.getPlayer().getInventory().getItemInMainHand());
...

and here is a gif of the situation:
as you can see the interaction reflects the pearls correctly, but does not reflect the eyes correctly.
https://gfycat.com/UnluckyPositiveCobra (you can see it in hd if you click the little hd button)

 

Now, i already looked around but i could have totally missed the change if you changed where this event trigger for endereyes is, but i dont think thats the prpblem, nor do I think you would change that.



 Comments   
Comment by md_5 [ 10/Mar/23 ]

The problem is due to client packets there are multiple events triggered. Check that the event is the one you want (right click). That one has the correct amount

Generated at Fri Mar 14 15:03:38 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.