Problem with launching player

Discussion in 'Spigot Plugin Development' started by HAMMERxPL, Oct 12, 2019.

  1. Hello, I have problems with cool effect of launching player. I found cool effect on Hypixel and I'm trying to create something similar. Here's video:
    I tried spawning entities and setting player to a passenger of it, but it didn't work that well. I also see that on this video it ejects player couple blocks above the ground. How to create this whole effect? Thanks for help!
  2. To start off with:
    You make the player a passenger of some other object. You set a velocity. You check if there's a solid block (i.e) 3 blocks under the launched player every few ticks. If there is, eject.
    When you find issues, adapt.

    Don't expect someone else to write the code for you.
    • Agree Agree x 1
  3. @drives_a_ford you didn't say anything new but I will try to make it perfect today. Thanks for your help. ;)
  4. What do you mean he didn't say anything new? He told you how to do it, when you provided 0 code of what you've done so far. - Copied step by step what he said and got my replica
    Code (Java):
        public void onTick(TickEvent e) {
   -> {
                Block under = getFeetBlock(a, 0.3D);
                if(under.getType() == Material.GRASS_BLOCK) {