How do I make a player knockback and then get the knockback distance?

Discussion in 'Plugin Development' started by Look, Apr 26, 2015.

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

    Look

    Basically I am coding a new kit to my kitpvp server, but I can't figure out how to get the knockback distance... Basically I can make the player knockback, but not get the knock distance.
     
  2. Offline

    Zombie_Striker

    You would need to increment the enchantment level till you get the knockback you want.
     
  3. Offline

    Look

    No... I an sorry but You didn't understand my question... I don't want to increase the knock back by an enchantment, and I sincerely don't know what this has to do with my problem... I don't want to explain the kit idea because it's so original and I don't want anyone to copy it. So basically the kit ability is: you right click an item at a player and it knockbacks the player out(I already coded this part because its the kit easiest part). But "what I want" is to get that knockback distance to make something later with that in distance, not to increase the knockback or whatever you said.

    Thank you for replying, and sorry if I was a little rude with you, that's because I am spending a lot of time to make this simple kit and a little nervous because this can be also a noob question with a simple answer like kb.getDistance() or something =p
    Also sorry for my bad English, that's because I am Brazilian tho.
     
  4. Offline

    Msrules123

    If you are making the player knock back with Vectors, store your vector in a constant for that kit and you'll always have the exact knock back that you knocked them back.

    Also, I see you liked my signature :p
     
  5. Offline

    Look

    Yes =p thank you, I am going to test it when I get home

    yes

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
Thread Status:
Not open for further replies.

Share This Page