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

    Criscolo

    you should really use it with not the development snapshot, but the release build. I am using 617 and it does not work, that is the latest release build downloaded 5 minutes ago from lukegb's server. also, how exactly does the speed configuration work? is it a multiplier, or does it add that to your velocity?
     
  3. Offline

    snick192

    im using 612
     
  4. Offline

    kahlilnc

    This is great, can you make the sprint button configurable if not already? Thanks.
     
  5. Offline

    Carbon131

    @snick192

    Try using a newer version of craftbukkit, I know 624+ work.

    @kahlilnc
    Thanks :) Do you mean to use a different key?
     
  6. Offline

    kahlilnc

    Yes and I cant get the plugin to work but the folder did pop up. CB 617
     
  7. Offline

    Criscolo

    could you compile it for CB 617? or at least release the source for others to compile it for their CB build?
     
  8. Offline

    Carbon131

    @Criscolo

    Yes I can, as soon as I'm able to access the website since I can't at the moment because its down.
     
  9. Offline

    hiphopgamer

    ^^ thanks, alot of use are using 617
     
  10. Offline

    GiantCreeper

    Looks like a nice plugin, But will it conflict with HeroSneak?
     
  11. Offline

    Shooty

    Don't work for me :(
     
  12. Offline

    Carbon131

    @GiantCreeper

    It shouldn't, because plugins always use the same events, but it will have to be tested to confirm.

    @Shooty
    You're probably using build 617 or lower, I have to update it for that but the link for it is down.

    Well it turns out the method I'm using doesn't work in build 617 or lower, so I would suggest build 618+

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

    davr

    I also want to voice another vote for a limited usage period combined with cooldown. So people can't just sprint around all day long. Maybe make it configurable, like:

    stamina-use-per-second: 10
    stamina-regen-per-second-walking: 5
    stamina-regen-per-second-standing: 10
    stamina-regen-per-second-sleeping: 25
    max-stamina: 100

    So as you sprint, stamina goes down. It goes up when you stop sprinting, with different values based on if you are walking, standing, or sleeping (I think for now, allow sleeping == standing on top of a bed without moving. Since you can't normally sleep during the day). In addition, if stamina hits 0, you cannot sprint again until it returns to 100.

    Just had another thought, it should probably display messages at certain conditions. Like when stamina hits 50%, "you are starting to feel winded", when it hits 0% "You are exhausted", when it gets back to 100%, "You are full of energy again"
     
  14. Offline

    Carbon131

    @davr

    I actually really like your idea of how to set it up. I'm working on it right now.
     
  15. Offline

    Nytemare3701

    In that case, would you mind attempting to implement TiredMan as well? I'd like to see this become a fully featured fatigue system. I'm willing to help if you have teamviewer and skype, since I'm learning to make plugins myself at the moment.
     
  16. Offline

    Carbon131

    @Nytemare3701

    Yeah, I could try implementing that and if your willing to help that would be definitely be appreciated. But my first priority is getting the standalone version working first.
     
  17. Offline

    MacVaultDweller

    I need a link to get build 618 so i can run your plugin.
     
  18. Offline

    xelfarcherdv

    since 617 is the recommended one, and switching to a higher build breaks all my other plugins, i will wait on this one. sounds like a good plugin though
     
  19. Offline

    Ull3R

    OH MY GOD! I freaking LOVE this plugin!

    It's spamming my console with " warning, player moved wrongly " all the time, but who cares! I can run/jump like a crazy monkey, lol :p

    Keep up the good work :D
     
  20. Offline

    Kizashi

    Great plugin!

    Could you maybe add an option to choose if you want the other boots to work with it aswell?
    Something like:

    leatherboot=true
    goldboot=true
    ironboot=false

    ect.
     
  21. Offline

    Solest

    Beautiful plugin, but I would love to see it with a limited duration (editable maybe? ;) ) and perhaps even a cooldown.
    For instance, the user could have 100 energy and, while sprinting, that energy level goes down until he hits zero and becomes "exhausted". Once he begins walking again, it regenerates at a given rate, and perhaps at an even greater rate when he's standing still or laying in bed.
    1 [cake] for you sir :)
    And there's plenty more where that came from :cool:
     
  22. Offline

    Carbon131

    @Kizashi
    Sure, I have another idea for that, would u want it to be like bootsid=x or each individual option?

    @Solest
    Thanks, I'm glad you like it. And I'm almost done with that and I hope to have a update out by the end of today :)
     
  23. Offline

    Shooty

    Dead link :(

    uh, can you give me a link with craftbukkit 618 ? Because the only version i'v found is 630 and 317 (i'm french sorry) and on 630 /give & /i don't work.. so i really want to use your plugin :( or just re adapt your plugin for build 617 :)

    Thanks :)!
     
  24. Offline

    Carbon131

    @Shooty

    Sorry, my Google Chrome was acting up and not uploading it correctly, it works now :) 630 should work because I run 642 on my server with this plugin.
     
  25. Offline

    Don Nguyen

    Not working on build 670 for me :|. The energy shows up but no matter what multiplier I use for velocity it doesn't change my movement speed.

    I hope you fix it! This is a very fun plugin and I really do want to use this. Take your time though =]
     
  26. Offline

    Carbon131

    @Don Nguyen

    I just tested it with build 670 and it worked perfectly fine for me. What speed are you using? And thanks :)
     
  27. Offline

    Don Nguyen

    Tried using the default 0.6 and then switched it to 2. Let me try one more time...

    Edit: Weird, I redownloaded 670 and it worked. Sorry for the trouble!

    A request, would it be possible to use some other key than the shift key? So we don't get stuck when there's a drop or have the option to change it? =]
     
  28. Offline

    Lilkuke

    When I start CraftBukkit, it says that Sprint "wasn't able to find Permissions", although I have permissions installed. I'm using build 670. Any suggestions?
     
  29. Offline

    Carbon131

    @Lilkuke

    Well it doesn't display that message for me when I run my server with cb build 670, so I would suggest redownloading craftbukkit and update Sprint to v0.5
     
  30. Offline

    Mentioum

    Enjoying this plugin a lot. Below is my feedback:

    Requests:
    1. Ability to choose item/multiple items required for sprinting.
    2. Alter the rate of regen messages in chat. e.g only notify every 10% instead of 5%
    3. Allow the regen rate to be a decimal. 1 isn't slow enough for me (I'm sure people are more unfit than that!) e.g 0.5
    4. Ability to choose the colour of the text so I can make it dark grey so it doesn't interfere with other chat as much.

    Also slight bug:

    On regen the chat gets spammed at 15% about 10 times or so. Only happens at 15%.

    Please continue developing.
     
  31. Offline

    Carbon131

    @Mentioum
    Thanks, I'm glad you like it!
    1-4. I'll implement all those things - good suggestions!

    Bug, I found the bug and it'll be fixed in the next release! Thanks!
     

Share This Page