Solved Speed command

Discussion in 'Plugin Development' started by iAmGuus, Mar 24, 2015.

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

    iAmGuus

    Hi all,

    So I was making a plugin for my upcoming server which needs an essentials (sort of) plugin.
    Everything just works fine but the /speed command wasn't. The command works fine, but what is the (sort of) formula to set the fly/walk speed?
    I am using p.setWalk/FlySpeed(float);
    When I try to do that it sets the speed but I can't walk.

    Regards,
    Guus Huizen
     
  2. I believe the float must be less than 1 but greater than 0. 0.3F is the normal walk speed (I think) or 0.2. Not sure about fly speed though. For example, using player.setWalkSpeed(0.5F) shouldn't freeze the player.
     
  3. Offline

    iAmGuus

    KingFaris11 , is there something like a formula for it, just like earth2me did with Essentials's /speed command?

    Thanks,
    iAmGuus
     
  4. @iAmGuus Did you even try/read what @KingFaris11 said? If so, are you getting any errors or stacktraces when doing the command? Please show full code and any relavent classes.
     
  5. Offline

    iAmGuus

    @CodePlaysMinecraft , Yes I did. I get no stacktraces. It just sets the speed but for some reason I can't walk when on ground but when I am jumping I can walk.

    This is the command class: http://pastebin.com/6i7w1yY2

    EDIT: Fixed it, forgot to add an F of float at the end of the argument.
    Thanks for your help anyways :)
     
    Last edited: Mar 24, 2015
  6. @iAmGuus Please set this threa to solved by going to Thread Tools > Edit Title > Prefix > Solved. Requesting thread lock....
     
Thread Status:
Not open for further replies.

Share This Page