Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change player's gravity?

Comments in 'Plugin Development' started by kingcc, Mar 25, 2016.

  1. kingcc
    Offline

    kingcc New Member

    Joined:
    Mar 16, 2016
    Posts:
    3
    Hey,I want to write a plugin to make player to jump higher,how to do?
    I have try:
    Write a function to change the $gravity in living.php ,but haven't effect.($gravity has really changed)
  2. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Isn't this like the jump higher effect?
    PHP:
    $player->addEffect(Effect::getEffect(8)->setDuration(40)->setAmplifier(1)); 
  3. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    PHP:
    $jump 1;
    $player->setMotion(new Vector3(0,$jump,0));
    Skullex likes this.
  4. kingcc
    Offline

    kingcc New Member

    Joined:
    Mar 16, 2016
    Posts:
    3
    Thanks for your reply.
    How to set this effect Infinite?
  5. kingcc
    Offline

    kingcc New Member

    Joined:
    Mar 16, 2016
    Posts:
    3
    Thanks for your reply.
    Are you serious? ...
  6. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    setDuration($time * 20)
  7. wii54
    Offline

    wii54 New Member

    Joined:
    Jun 3, 2015
    Posts:
    10
    Minecraft User:
    wii54
    just put a really long number,like 100 years
  8. wii54
    Offline

    wii54 New Member

    Joined:
    Jun 3, 2015
    Posts:
    10
    Minecraft User:
    wii54
    when the displayer can't fit the number, it will display xx:xx

Share This Page

Advertisement