Solved Jump Higher, velocity not working...

Discussion in 'Plugin Development' started by MrBigChicken, Feb 19, 2014.

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

    MrBigChicken

    So, I was trying to make a bukkit plugin which worked out pretty well.
    But I need some help with a little piece of code. All i want is the player to jump a little higher, I already tried
    Code:
    player.setVelocity(new Vector(0, 2, 0));
    what does not give me some working thing.
    Any ideas? (I don't want to use potionEffects because you can see them when you are taking a look in your inventory...)

    Jim.
     
  2. Offline

    maxben34

    That probably isn't working because there is no event for it. You can use a player move event or check when a player !isonGround with an if statement.
     
  3. Offline

    adam753

    That code should work. Maybe the problem is that your listener isn't working, or something similar?
     
  4. Offline

    Garris0n

    Where are you putting that code?
     
  5. Offline

    MrBigChicken

    garrison adam753 maxben34 Oh thanks now is see I put it in the onPlayerJoin event, stupid -_-
    But where else to put it if i just want to manipulate it so only when you jump you get that velocity?
     
  6. Offline

    maxben34

    Instead of mindlessly tagging people, you could read the responses you have received prior. As you can see I told you that your best bet is to check if the player.isOnGround();

    It isn't helpful to respond to a thread 2 weeks after you post it... Simply wasting my time and others who are trying and are nice enough to help you.
     
  7. Offline

    MrBigChicken

    Sorry, thank you very much tho. :) maxben34
     
  8. Offline

    Freelix2000

    Don't make a new vector. Define a location that is the same as the player's, only looking up, then convert it to vector and set that as their velocity.
     
Thread Status:
Not open for further replies.

Share This Page