I don't wanted to make a thread to resolve my problem. But well, "who doesnt ask is dumb", at least I tried to figured it out my self, I failed. So, I want to extend my already made plugin with a other feature. If a player holds an enderpearl and rightclicks, he actually shoots an egg, than the player get's teleported to the location of that egg. <Till here I made it work> The problem is, on what Event I would do this method? With Player_Interact it just than teleports you to the interact-location, ye how logic, sure. I really have no idea and my brain is exploding from those hugelists of possiblites. And when the hell is a Player_Animation Event fired?
Nice idea, not sure if it's possible though.EDIT: Brainwave, onInteract, on Right click block, get item in hand (egg), get location of right click.
thats the other thing I forget to write. The player get's teleported to the impact of the egg on the ground and not on the block he's/she's cklicking at. So I already tried this, but thats not that what I wanted. how can I place an event into another event? like on playerineteract, than it gets that egg from the method and uses it on a playerthrowegg event? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
you could get the entity id of the egg, and on projectileHitEvent, check the id, or something like that.