Move speed value of player

Discussion in 'Development' started by Nora1903, Jul 18, 2018.

  1. Nora1903

    Nora1903 Slime

    Messages:
    82
    GitHub:
    cuongvnz
    How to change speed value of an player when he is moving? Like /speed <value> in EssentialsX plugin of java edition.
     
  2. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    research is key
    1. https://forums.pmmp.io/threads/adjust-players-speed-in-creative.1943/

    here if you dont want to see
    PHP:
    $attr $entity->getAttributeMap()->getAttribute(Attribute::MOVEMENT_SPEED);
    $attr->setValue($attr->getValue() / (0.2 $speed));
    $speed can be anything
    $entity is player
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.