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

    Kainzo

    I so want this ability in our upcoming Heroes RPG - thanks for the great plugin.
     
  3. Offline

    Exxter

    Great Plugin, works for me really good. Thanx very much :)
     
  4. Offline

    Zarius

    Just wanted to note that I don't see this error at all (CB740).
     
  5. Offline

    Manbeast77

    I think it depends on the plugins you are using. This seems to conflict with one I already have installed. More than likely, MCMMO, which I will not get rid of.
     
  6. Offline

    Zarius

    Yeah probably a plugin conflict but not mcMmo as I use this one with no problem, using 50 or so plugins - see the list in my sig. What plugins stop you use? You might be able to narrow down the potential plugin at fault.
     
  7. Offline

    Bman212121

    It's not a plugin issue. It looks as though the code isn't correctly disabling the need for permissions. I'm testing it on a server with only sprint plugin, CB733, and 1 user in the ops.txt file. It will spam the console with:
    Code:
    2011-05-05 00:58:13 [SEVERE] Could not pass event PLAYER_MOVE to Sprint
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
    	at com.Carbon131.Sprint.SprintPlayerListener.onPlayerMove(SprintPlayerListener.java:72)
    	at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:242)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:130)
    	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    	at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.permissions.PermissionHandler
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    	... 12 more
    It's attempting to call permissions which does not exist.
    EDIT: Went ahead and threw permissions on the server since I also wanted to use disarm. Put that on the server and sprint works now.
     
  8. Offline

    Nytemare3701

    Request: toggle sprint with /sprint
     
  9. Offline

    lordthree


    I'm getting the exact same error I believe. The permissions are enabled, but I get this error every time someone who isn't an op tries to sprint. I de-oped some people and the next thing I knew they could no longer sprint. If I op them again it works...?
     
  10. Offline

    Maoman

    This is great, especially since (at least, as far as I can find) there aren't many sprint plugins. However, I have a couple suggestions/issues.

    1: Can you negate the sneak function of not falling off blocks while sprinting? It's such a pain.

    2: If i'm running backwards and I press shift, I'll suddenly sprint forward. It needs to either do nothing or sprint backwards, cause if you're backing up, its usually away from a creeper or something, and the last thing you need is to accidentally sprint forward.

    3: It only recharges when either you're walking or you're moving the camera with your mouse. If you're completely still, it doesn't charge.

    4: Also, I don't know if this is unavoidable or not, but the sprinting is very halting, as in i'll move forward at sprint speed for about .45 seconds, then sneak speed for .05 seconds, and alternate like that. The majority of the time is still very fast, but that jerkiness is quite bothersome.
     
  11. Offline

    Carbon131

    New in Version 1.0
    • Fixed no permissions detected problem (wouldn't work without permissions)
    • Added Sprint version check (notifies you in the console that there is a new version of Sprint available)
     
  12. Offline

    Janb

    Would it be possible to allow the option of an item to toggle this off or on with? So players can use sneak if they want?

    Perhaps just an option to define an object that when right-clicked turns the mode on, right-clicking again turning it off (e.g. I'd probably use a wooden bowl as this ability is exclusive to my Monk class). Maybe add a configurable status message, too, like "You focus your chi and feel much lighter."
     
  13. Offline

    Carbon131

    @Janb

    Yes, that will be included in v1.1
     
  14. Offline

    Carbon131

    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.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'
     
    Brvtvs likes this.
  15. Offline

    Brvtvs

    I thought I was just doing something wrong with the held-item.enabled problem i was having. Thanks

    When using this for a pvp class, it seems that highjump requires a lot less energy and gets a lot more power. My players really enjoy the highjump and I am reluctant to set it to false, is there any way to regulate it so that it is more similar to sprinting horizontally?

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

    Kyeria

    I love this plugin, but I was curious if you might add an option to turn off stamina that you don't need stamina to run.
    I realize you can turn the energylostpersecond to 0 but then you just get spammed constantly with messages that you have 100% stamina. =( I dunno if this is a bug or not but if you could disable it or simply disable text that would be awesome.
     
  17. Offline

    Carbon131

    @Brvtvs
    That's definitely possible however may require some rewrite in coding so I'll see what I can do.

    @Kyeria
    Yeah I can modify a section of a code to do that for you so it'll be released in the next update :)
     
  18. Offline

    Kyeria

    Awesome! Thank you so much!
    I love this plugin so much and I'm very excited for your update! I greatly appreciate your reply =)
     
  19. Offline

    Carbon131

    New in Version 1.3
    • Changed it so when energy-lost-per-second is set to 0 the stamina messages wont show up
     
  20. Offline

    Courtney

    Does this work in CB 818?
    If not I hope you update soon, I love using my Batman shoes :C
     
  21. Offline

    Carbon131

    @Courtney
    Yes it works with CB 818, I have it running on my server right now.
     
  22. Offline

    Courtney

    Alright thanks for letting me know, much appreciated.
     
  23. Offline

    Missnostalgia

    Any reason why the high jump would not be working? I have the permission in, but it seems to not work...
     
  24. Offline

    Carbon131

    @Missnostalgia

    The only reason I can think of is that you set the sprinting speed too low resulting in a not very noticeable high jump, or high jump is disabled.
     
  25. Offline

    Missnostalgia

    Speed is currently at 0.8 ? I assume that is too low?
     
  26. Offline

    Carbon131

    @Missnostalgia

    Well mine is at 0.9 and it still works well for me, can you post your config?
     
  27. Offline

    Missnostalgia

    Code:
    requires-item:
        item-id: 317
        enabled: true
    held-item:
        item-id: 341
        enabled: false
    messages:
        interval: 25
        energy-lost-color: c
        energy-gained-color: b
    options:
        energy-gained-per-second: 5
        speed: 0.9
        energy-lost-per-second: 5
        requires-command-enabled: false
        high-jump-enabled: true
    
     
  28. Offline

    Carbon131

    @Missnostalgia

    Seems like everything is ok. Are you facing up when you use high jump or simply jumping? You need to face up in order to use it, sorry if the name is deceiving.
     
  29. Offline

    Missnostalgia

    That was it! I didn't know I had to look up, maybe you could change it to saying (You must look up and jump) XD.
     
  30. Offline

    Carbon131

    @Missnostalgia

    Yeah its a misleading title, I will make a note ;)
     
  31. Offline

    Kevger

    good work ;)
     

Share This Page