Tridents are not logged
MiniWorks18 opened this issue ยท 5 comments
Tridents have no action logged by prism. You can throw a trident (projectile) then pick it up off the ground and nothing gets logged. This is especially inconvenient when investigating lost tridents.
If you drop the item to the ground like a normal item, I'm very sure it would track that because at that point it's just an ItemStack.
But using the "throw" action on it turns it into a projectile and becomes a "thrown trident":
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Trident.html
Since Tridents weren't around previously and no other item had this same property of being thrown and the entity being tracked, it's not implemented. The only projectile tracking I can see in the code is from damage or death (eg PrismEntityEvents.java#L167).
So we have to add two tracking events:
- Trident thrown, where a player "uses" a trident (maybe trident-use or trident-throw?)
- A used/thrown trident being picked up (not the item that someone dropped)
Can I ask - this item pickup is definitely not logged correct?
- Have you tested when a trident is dropped from an inventory manually ie NOT thrown - is it logged then?
At this point I have not found any event triggered when this occurs (the pickup event )
The throw event is reletively straight forward...
My understanding is that a thrown trident is really just an arrow projectile and would use the PlayerPickupArrowEvent
when a player picks it up (will only happen if the trident has PickupStatus != DISALLOWED
). Should be easy to test with WhatIs, I should be able to test this today.
@addstar it should...but whatis didnt see