Inactive [FUN] Sprint v1.3 - Enable users to sprint by using sneak [953]

Discussion in 'Inactive/Unsupported Plugins' started by Carbon131, Apr 4, 2011.

  1. Offline

    Carbon131

    Sprint - Enable Users To Sprint:
    Version: v1.3

    Sprint allows users to sprint by holding down your sneak key and moving. It does this by multiplying the velocity of a user by a given number when they hold shift and are moving. It has a configurable speed and permission support.

    Features:
    • Lets users sprint while holding sneak key
    • Configurable sprint speed
    • Configurable energy meter
    • Live in-game configuration editing
    • Permission support
    • Easy installation
    Download:

    Download Sprint.jar
    Source Code

    Installation:
    Download the Sprint.jar and extract it to your plugins directory. Run your server and a Sprint folder will be created in your plugins directory with a config.yml in it.
    Now edit your config.yml:
    Code:
    requires-item:
        item-id: 301 # id of the item which is required to wear to sprint (must be either boots, chestplate, leggings, or helment)
        enabled: false # if a item is required to be worn in order to sprint (true = enabled, false = disabled)
    held-item:
        item-id: 0 # id of the item which is held by the user to enable/disable sprinting by left clicking
        enabled: false # enable/disable being able to enable/disable sprinting by left clicking with a specified item in a person's hand
    messages:
        interval: 5 # use 5 or 10 for this option. (every 5 or 10 % amount of energy used/gained a message will appear with your current energy left)
        energy-lost-color: f # the color that is displayed when a user is losing energy
        energy-gained-color: f # the color that is displayed when a user is gaining energy
    options:
        energy-gained-per-second: 1 # amount of energy gained while not sprinting
        speed: 0.6 # controls the sprint speed (its what the player's direction's velocity is multiplied by)
        energy-lost-per-second: 1 # amount of energy lost per second while sprinting
        requires-command-enabled: false # if set to true, it will allow people to enable/disable sprinting by using '/sprint on' or '/sprint off'
        high-jump-enabled: false # if set to true, it will allow users to jump high while sprinting, but if set to false, users will jump the same height while sprinting as the normal jumping height
    NOTE: If upgrading from v1.0 or below to v1.1+ you must delete your Sprint folder and restart your server or plugin for the new config file to be created! If not the plugin will not work!

    Permission Nodes (open)

    sprint.admin # allow users access to sprint administrative commands
    sprint.allow # allow users or groups access to sprint
    sprint.highjump # allow users who have sprint.allow be able to jump high while sprinting

    NOTE: If no permission nodes are detected, it will default to using ops.txt.

    Commands (open)

    Sprint Commands:
    /sprint on : Enables sprinting.
    /sprint off : Disables sprinting.

    Sprint Administrative Commands:
    /sprint speed <amount> : Change sprint speed.
    /sprint energygainedpersecond <amount> : Change energy gained per second.
    /sprint energylostpersecond <amount> : Change energy lost per second.
    /sprint highjump <enable|disable> : Enable/disable sprint highjump.
    /sprint requiresitem <enable|disable> : Enable/disable require item to wear.
    /sprint requirescommand <enable|disable> : Enable/disable require command to enable/disable sprinting.
    /sprint helditem <enable|disable> : Enable/disable being able to enable/disable sprint using an item.
    /sprint helditemid <id> : Change the item that is used to enable/disable sprinting.
    /sprint itemid <id> : Change the required item to be worn.
    /sprint messagesinterval <seconds> : Change the interval between messages sent while sprinting.
    /sprint energygainedcolor <color> : Change the color of the energy gained message.
    /sprint energylostcolor <color> : Change the color of the energy lost message.

    Changelog (open)

    Version 1.3
    • Changed it so when energy-lost-per-second is set to 0 the stamina messages wont show up
    Version 1.2
    • Divided '/sprint admin' into 2 separate pages
    • Fixed bug where you were required to have 'requires-command-enabled' enabled to use 'held-item.enabled'
    Version 1.1
    • Added ability to enable/disable sprinting by using commands
    • Added in game administrative commands (you can change any setting in the configuration file in real time)
    • Added ability to enable/disable sprinting by left clicking with a specified item
    Version 1.0
    • Fixed no permissions detected problem (wouldn't work without permissions)
    • Added Sprint version check (notifies you in the console if there is a new version of Sprint available)
    Version 0.9

    • Added sprint.highjump permission node
    Version 0.8

    • Added high-jump-enabled option to config
    Version 0.7

    • Added energy-gained-color and energy-lost-color to config.yml
    • Changed messages to display as 'Stamina: #%'
    Version 0.6

    • Reconfigured config.yml
    • Added decimal support for energy-lost-per-second and energy-gained-per-second
    • Added item-id option
    • Added messages options (interval and color)
    • Fixed message bug (spammed 15%)
    Version 0.5

    • Converted config.properties to config.yml
    Version 0.4

    • Added energy meter and config options (energy-lost-per-second, energy-gained-per-second)
    • Fixed minor bugs
    Version 0.3

    • Fixed glitch were a user could go infinitely in the air
    Version 0.2

    • Attempting to fix Mac error (was using ancient version of eclipse)
    • Added leatherboot option in config
    Version 0.1

    • Initial Release
     
  2. Offline

    Zarius

    Still loving the plugin and working great in RB860 :D
     
  3. Offline

    Carbon131

    Thanks, luckily it doesn't have much coding that would break in updates :)
     
  4. Offline

    haruka

    I have a litte issue with that. I'm in the group "Admins", but I'm not allowed to use /sprint

    Code:
        Admins:
            default: false
            permissions:
                - '*'
                - '-eternalwolf.release_own_wolves'
                - '-eternalwolf.release_other_wolves'
    A friend of mine, who is in group "Operators" (which inherits from "Users") is also not allowed to use /sprint.

    Code:
         Users:
            default: false
            permissions:
                - 'oredetector.*'
                - 'eternalwolf.call_wolves'
                - 'eternalwolf.check_owner'
                - 'sprint.allow'
                - 'sprint.highjump'
    My sprint-config:
    Code:
    requires-item:
        item-id: 317
        enabled: false
    held-item:
        item-id: 0
        enabled: false
    messages:
        interval: 5
        energy-lost-color: f
        energy-gained-color: f
    options:
        energy-gained-per-second: 1
        speed: 2.0
        energy-lost-per-second: 1
        requires-command-enabled: true
        high-jump-enabled: true
    And I'm using craftBukkit build 860 and Sprint 1.3.
     
  5. Offline

    Carbon131

    @haruka

    Can you post your entire Permissions config and the version of it?
     
  6. Offline

    Sleepywalker

    I think with the new bukkit build 918 its broken the movement of sprint a little bit.

    my symptoms are I cant run as fast as I used to (increasing speed from 0.9 to 1.8 or higher does nothing)
    and the high jump is not quite as high as it used to be.
    but they said that this build would be affecting movement type plugins.

    Sleepywalker
     
  7. Offline

    Carbon131

    @Sleepwalker

    Interesting, I just tried it on my server with Craftbukkit build 928 and it seemed to work the same way as before. The only explanation I can think of is your tick rate has gone down with this build.
     
  8. Offline

    haruka

    @Carbon131

    I'm currently running "Permissions 3.1.5b".

    Full group-permission file:
    Show Spoiler
    Code:
    groups:
        Guests:
            default: true
            info:
                prefix: ''
                build: false
                suffix: ''
        Users:
            default: false
            permissions:
                - 'oredetector.*'
                - 'eternalwolf.call_wolves'
                - 'eternalwolf.check_owner'
                - 'sprint.allow'
                - 'sprint.highjump'
            inheritance:
                - Guests
            info:
                prefix: ''
                build: true
                suffix: ''
        Operators:
            default: false
            permissions:
                - 'weather.*'
            inheritance:
                - Users
            info:
                prefix: ''
                build: true
                suffix: ''
        Admins:
            default: false
            permissions:
                - '*'
                - '-eternalwolf.release_own_wolves'
                - '-eternalwolf.release_other_wolves'
            inheritance:
                - Operators
            info:
                prefix: ''
                build: true
                suffix: ''
     
  9. Offline

    Carbon131

    @haruka

    Sorry for the late response, it may be because of the way Permissions 3.x works, I will see if I can fix it.
     
  10. Offline

    undeadmach1ne

    i just tested this out and its super fun but a little buggy i think (i am using dev build 970). i run fast, but the speed seems to pulse, its not linear. its like i run for 3 steps then walk or sneak for the 4th step, then repeat, or i accelerate up to a point then slow down and immediately start accelerating again. other players said i looked like i was running normally though. also, high jump is enabled and it seems i cant even clear one block with it most of the time.

    again, its super fun though. thanks =) i can see myself continuing to use it despite the minor strangeness.
     
  11. Offline

    TheTennessee

    What is the permissions node for the normal sprint commands? My players can sprint, but they can't "/sprint on" or "/sprint off"... I have permissions installed, with sprint.allow and sprint.highjump on them. I don't exactly want to give them sprint.admin
     
  12. Offline

    ಠ_ಠ

    Since im holding shift, im guessing i wont fall down a block? so ill have to let go every so often to jump down a block?
     
  13. Offline

    TheTennessee

    Well, that's actually the problem with mine... My players go right off blocks and can't use sneak to build with. -_-
     
  14. Offline

    ಠ_ಠ

    Half the time i go off, and half i dont... and i cant jump unless i HOLD the space bar down for like 10 seconds... i have like 4-5 mis jumps... dont understand... thinking of not using this anymore :\
     
  15. Offline

    Carbon131

    The sprinting is based on tick rate, so that is only happening because of server latency.
     
  16. Offline

    TheTennessee

    Well, can I get a reply about players being able to turn OFF sprinting? My players are having one hell of a time trying to actually sneak around to build because they can't turn it off.
     
  17. Offline

    Carbon131

    Oh I didn't see your post, sorry. So /sprint off doesn't work? Do they even get a message?
     
  18. Offline

    TheTennessee

    He was saying it tells him he's not allowed to. When I use it as a Moderator (permissions support, sprint.admin is under moderator), I can use it, but it doesn't turn it off. Last I tested was before the 1000 update though. But since this is still 953... I don't know if that would make any different.
     
  19. Offline

    undeadmach1ne

    in my case with the pulsing speed and not being able to super jump, i am playing on the same pc that is running the server. would latency still effect me?
     
  20. Offline

    ddubois89

    sprint off command doesnt work for me. very annoying when trying to build on a ledge holding shift
     
  21. Offline

    Zarius

    I play on the same PC as the server and have no problems.

    Working great still in RB1000 :)
     
  22. Offline

    TheTennessee

    Well, what settings do you have then? How did you set it up? While you may have it working, there's at least two of us who can't make it turn off. Then again, you may have it set to certain boots/held item. I on the other hand have it set to always on, except for the text command that is supposed to turn it off.

    Wow, nevermind, I'm an idiot, or something... There's a setting "requires-command-enabled" that is evidently set to false disabling the feature. I seriously faceplanted. So... just turn it to true, it works fine. Who the heck makes a config option for that?

    P.S. Yes I know, it's in the OP... I just didn't expect there to even be one. Wish someone had mentioned it... but I completely missed it.
     
  23. Offline

    Zarius

    Yeah, I have it set to work when you wear leatherboots - hence I've never tried the commands and don't want them to work. Glad you got it working :)
     
  24. Offline

    TheTennessee

    Well, on my server, sprint is a class specific ability to Warriors. Hence, this was an issue with my warriors. It still tells them they do not have permissions to do it, but it works anyways. So... for the time being, it's a minor inconvenience. And yeah, I have a ton of plugins installed specifically for classes, like spyer, bandages, hookshot, sprint, armageddon (for mages!), and elixir. Hard testing them when I only play a mage myself.
     
  25. Offline

    xSpecialKx

    Not working for me and when I attempt to use the command it says I don't have access even though I have permissions 3.0 installed.
     
  26. Offline

    TheTennessee

    Yeah, when I got it working, it still says that, but it turns it on and off. It's that setting in the config file you need to find.
     
  27. Offline

    xSpecialKx

    Hmmmmm I have the "requires-command-enabled" set to true but still nothing is happening.

    Got it working but I had to disable HeroSneak for it to work, seems they're not compatible. Any idea why or if there's a way for me to fix it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  28. Offline

    TheTennessee

    Strange, I am using HeroSneak too... and it is working as I described. Maybe it is because you have them on the same players? See, my HeroSneak is only on rogues, but Sprint is only on Warriors... so maybe that is why they aren't conflicting as much.

    My guess is, HeroSneak makes it seem like you are always crouched, and therefore, not allowing you to "sneak more" or something.
     
  29. Offline

    Kane

    @Carbon131 Any chance of keeping this plugin going? Also any words on nocheat?
     
  30. Offline

    Sepulzera

    The message that you must rest (stamina 0%) isnt limited by messages interval of the config :/

    EDIT: My bad, thought "interval" would set a time-limit before sending the next message :\
    Should be added, thought.
     
  31. Offline

    Zarius

    Still working for me in 1060 :)
     

Share This Page