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

    Josh Ice

    I had a little bit of trouble with the yml file. It was throwing an error about mapping values not being allowed.
    I redid the yml file to look like this
    Code:
    requires-item:
        item-id: 301
        enabled: true 
    messages:
        interval: 5
        color: f
    options:
        energy-gained-per-second: 1
        speed: 0.6
        energy-lost-per-second: 1
    
    It worked, Yaml tends to be really picky about it's spaces and I think it prefers to look like this.
    Maybe you should make it in a vertical fashion instead of horizontal by default for less confusion.
    Thank you and great plugin!
     
  3. Offline

    Mentioum

    Wow speedy response to requests e.t.c - I'll be sticking with this one... (Much smaller file size too ;P) I own lpminecraft.com btw. This is a plugin that Niji and I will bear in mind to feature in the show that we are planning.

    1. Another pointer! I suggest switching from "Energy Left" to only having it say "Stamina #%".
    2. I would also suggest being able to set different colours for when Stamina goes up as opposed to when it goes down... e.g red when losing stamina and green when gaining stamina.
    3. I have a good idea for a good plugin collection if you would like a suggestion?

      Thanks again!

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

    Carbon131

    @Josh Ice
    Well I use Notepad++ and it seems to work fine when editing it, but I'll see what I can do. But thanks, and no problem!

    @Mentioum
    Yeah I've had some free time lately so I've been working on this :) Wow, thats pretty cool! I'm honored!
    1-2. Yet some more good suggestions! I'll definitely see what I can do.
    3. Sure, always open to suggestions.

    And no problem! I appreciate the suggestions and feedback! :)
     
  5. Offline

    kahlilnc

    Bug: You cant sprint off a edges or go up half blocks, other than this, the plugin is beast.
     
  6. Offline

    BioRage

    Hmm, I'll test this out, looks promising, can be used for RPG classes's aswell.

    Cheers!

    (Good Job btw)

    Could you post a SS of Energy Meter?

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

    Finer1

    And what about a sneak ?
     
  8. Offline

    sdeddy

    cool plugin!
    I use shift to open my inventory, so making the sprint button changeable would be nice.
    Keep up the good work!!!
     
  9. Offline

    Flenix

    thats because when you "sprint" its just a sped up sneak. All the mod is doing is letting you configure the speed of sneaking, and instead of slowing down, you speed up :) Hence using shift as the key for it
     
  10. Offline

    Carbon131

    @BioRage
    Thanks :)

    Pictures of default health meter:
    [​IMG]
    [​IMG]
     
  11. Offline

    Mentioum

    awesome thanks for implementing :p
    new features. I'll PM you my proposition!
     
  12. Offline

    kahlilnc

    Can you add a alternative key for the sprint please. Configurable.
     
  13. Offline

    Carbon131

    @Mentioum
    Sure thing :) Sounds good.

    @kahlilnc
    Just use what ever key you use for crouching.
     
  14. Offline

    Shooty

    Hey i found a bug,

    Point the sky, press shift... You make an Super Jump !

    It's very very cool :p !

    And the super jump works practically nothing bug ! It's fluide ...

    (Sorry for bad english, i'm french)

    Thx for all :D
     
  15. Offline

    kahlilnc

    But I like the crouch button for building.
     
  16. Offline

    Carbon131

    @Shooty
    You probably have your speed way too high, and you will launch yourself in the air when its that fast.

    @kahlilnc
    Would you prefer to have a command that activates sprinting then?
     
  17. Offline

    kahlilnc

    Yes that sounds gud i likey but having it be C or something would be nice too. But thats okay.
     
  18. Offline

    BioRage

    @Carbon131

    Thanks for pictures, I guess no way to implement it into the GUI, :( (I perfer GUI but I guess that can't be forced?, I rather not have chat spam + that + hunger spam.)
     
  19. Offline

    Kimberly2000

    Haven't D/L'd the plugin yet, because I was hoping it had an option for an item to be held (configurable item) to activate the sprint, rather than item worn. Also don't like the idea of having to hold the sneak key down. Can the key be toggled in the config, and an option to hold an item vs wearing an item be added?
     
  20. Offline

    Knapier89

    Actually, you can change the button assigned to crouch. So just change that if you don't want this to interfere with shift-crouching.
     
  21. Offline

    BioRage

    @Carbon131

    So, I tried it.

    I must say it seemed very buggy to me.

    I also installed HeroSneak

    With them both on, I gain like 8x my normal speed.

    Also, when I hold shift, and Jump I walk really fast (glitching)

    Thought I'd let you know :)
     
  22. Offline

    nickrev

    can you make it toggleable?

    this is mega amazing! i wish u could bind it to ctrl or R or something though

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

    LightKing

    I totally agree with nickrev, this is really really cool, and works perfectly!
     
  24. Offline

    Beatkidz

    I love the plug-in. but there is one major problem.
    the super jump when you hold shift and look up. this would be cool if i wasn't running a balanced PvP server.
    is there anything you can do about this?
     
  25. Offline

    MeinerHosen

    GREAT idea, my server was just talking about the idea of sprinting. My regret is that I cannot download it with the bugs it has when I'm running a survival server :/
     
  26. Offline

    Nytemare3701

    I personally love it. Any chance you can make it a toggle in the config? Perhaps a seperate mechanic entirely with its own permission?
     
  27. Offline

    Beatkidz

    i agree. after playing with it for awhile i gave it to the server anyway. was WAY to much fun
     
  28. Offline

    Nytemare3701

    I know right?
     
  29. Offline

    Zarius

    Another vote here for the superjump to stay - I love it :D Balanced it out to my personal taste by increasing the energy-lost to 10.
     
  30. Offline

    xxXAcePilotXxx

    Is it right shift :|?
     
  31. Offline

    Mentioum

    I like the super jump. It has good risk attached to it... I like it.

    As far as message... ill send when i have time. Just been a bit crazy recently!
     

Share This Page