Event into to another event

Discussion in 'Plugin Development' started by Smex, Oct 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Smex

    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?
     
  2. Offline

    Stuu

    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.​
     
  3. Offline

    Smex

    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. :p

    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.
     
    Last edited by a moderator: May 20, 2016
  4. Offline

    Nitnelave

    you could get the entity id of the egg, and on projectileHitEvent, check the id, or something like that.
     
Thread Status:
Not open for further replies.

Share This Page