[MECH] GoldenSprint v1.2 - Configurable Sprint Plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Nate Wiebe, Apr 16, 2011.

  1. Offline

    Nate Wiebe

    GoldenSprint v1.2 - Simple sprint plugin:
    Version: Download v1.2

    Ever thought there was no use for Gold Boots? Well you're wrong. Put them on and you will be able to run like the wind. Only thing is you can get tired and will have to slow down back to a walk to regain your energy.

    Features:
    • Allows users to sprint with Gold Boots
    • Energy Meter
    • Permissions Support (Tested with v2.7)
    • Refresh Ability with a command or by eating food
    • Bonus speed and energy from Golden Apples
    • Toggle Unlimited Energy (Hulk Mode)
    • Configurable: sprint speed, regen/energy rates, bonus speed
    • Optional: Can choose what boots to use, and the normal/bonus speeds of each type. (barefoot, gold, iron, diamond, chainmail)
    How to use:
    • Put on Gold Boots
    • Use the sneak/crouch key to sprint (Default: Shift)
    • Eating a Golden Apple will boost and double the length of the sprint
    • /gsrefresh [player] to refresh a player's energy ([player] field is optional)
    • /gshulk [player] will give the player unlimited energy ([player] field is optional)
    Permissions:
    • gs.use.sprint - sprint ability
    • gs.use.goldenapple - golden apple ability
    • gs.use.regen.* - allows for all food types to refresh energy
      • gs.use.regen.apple
      • gs.use.regen.bread
      • gs.use.regen.cookedfish
      • gs.use.regen.cookie
      • gs.use.regen.grilledpork
      • gs.use.regen.mushroomsoup
      • gs.use.regen.rawpork
      • gs.use.regen.rawfish
    • gs.admin.refresh - /gsrefresh command
    • gs.admin.hulk - /gshulk command
    Installation:
    • Install PermissionsEx
    • Place .jar in plugins directory
    • Reload server
    Help:
    This plugin REQUIRES PermissionsEx.​
    To get assistance, please indicate which Bukkit build you are running on, and paste your GoldenSprint.properties file as well as any errors from the console here: http://www.pasteall.org/
    Changelog (open)

    Version 1.2
    • Moved dependency from Permissions to PermissionsEx
    • Updated for lastest Bukkit build
    Version 1.1
    • Fixed NPEs
    • When a user logs in, their energy is set to 0
    Version 1.0
    • Added chainmail to boot option
    • Fixed a stupid mistake
    Version 0.9
    • Fixed the bug that caused your bonus energy to be removed when eating food
    • Can now choose what boot (bare, gold, iron, diamond) will let you sprint and configure the normal and bonus speeds of each type.
    Version 0.8
    • Added Hulk mode (/gshulk) to give player unlimited energy
    • Cleaned up the code a bit
    Version 0.7
    • Fixed a bug with cake by removing cake from the energy list.
    • Fixed a bug where you could get energy by left clicking with food in your hand.
    • Added the ability to remove the energy bar and only get notifications when you had no energy and full energy.
    Version 0.6

    • fixed an exploit where sprinting could be abused by jumping or going into water, still not 100% perfect, but the best that can be done with what the API offers.
    Version 0.5

    • allows food to replenish energy
    • configurable to allow sprinting without boots
    Version 0.4


    • REQUIRES Permissions (Permissions is good to have, also cleans up the code)
    • Eating a Golden Apple will make the sprint last twice as long, as well as give a speed boost during the excess energy
    Version 0.3


    • Added a configuration file
    Version 0.2


    • Added Permissions Support
    • Changed the energy regen/use rate
    • Made regen more verbose
    • added a /gsrefresh [player] to refresh a player's energy
    Version 0.1


    • Initial Release
     
  2. Offline

    Nate Wiebe

    @BioRage: thats the next thing I'm working on.

    Version 0.6 Released

    • fixed an exploit where sprinting could be abused by jumping or going into water, still not 100% perfect, but the best that can be done with what the API offers.

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

    Mason6364

    Hey I just thought of an idea, Make a boot that makes you able to walk on water!
    Is that possible in Bukkit?
     
  4. Offline

    Nate Wiebe

    @Mason6364: not sure about that.. but I will look into it
     
  5. Offline

    Mason6364

    Tested it, it loads up the GoldenSprint thing, I have permissions set right, but when I press and hold the shift (crouch key) i just walk like im crouched, but it shows my energy bar going down slowly, any ideas?
     
  6. Offline

    Nate Wiebe

    what version of bukkit are you using?
     
  7. Offline

    Mason6364

    Woah I didn't know being 1 version from up-to-date could make such a difference, you just fixed 2 different mods, thank you ! :D
     
  8. Offline

    Kainzo

    Latest Version / 684
    2011-04-21 09:21:19 [SEVERE] Could not pass event PLAYER_INTERACT to GoldenSprint
    java.lang.NullPointerException
    at com.natewiebe13.GoldenSprint.GSListener.getTimer(GSListener.java:173)
    at com.natewiebe13.GoldenSprint.GSAppleListener.onPlayerInteract(GSAppleListener.java:54)
    at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:252)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:64)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:397)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  9. Offline

    Nate Wiebe

    @Kainzo: yeah, haven't updated for latest build yet. Yesterday ended my Portal 2 hiatus and today I have exams. I will have a fix posted later tonight.
     
  10. Offline

    nymm

    This plugin cause a bug that provide an unlimited source of food and energy.
    It apparently allow player to eat a cake in their inventory (impossible without this plugin, you're normally forced to place it first in order to eat it) and when eated it doesn't disappear from the inv.
    Tested against Build 677
     
  11. Offline

    Nate Wiebe

    @nymm: Interesting. I will look into this. I just sat down to do some coding so it shouldn't take too long for v0.7 to be released.
     
  12. Offline

    DerET

    A video would be nice - maybe I'll try it tomorrow and make one :)
     
  13. Offline

    nymm

    Also, even when a cake is placed, it can be eated an unlimited number of time.

    Except that, this plugin really is good, the only "problem" is that it flood the chat, especially when the player is running/walking:
    [GS ||||||||||]
    Something awesome would be to delete the last "GS..." message when a new one appear, but I don't think it's possible :(

    Or, and that's totally feasible, add an option to remove this message showing the energy left AND add the number of seconds of energy a player has gained when he eat food ("by eating an apple, you gain 3 secs of sprint").

    Because really, the sprint only last 10 seconds it's not that usefull for the players to know their energy left (in my opinion!)

    And another bug found: when holding any item of food (that can provide energy) and punching any bloc around (even the air) it will make the player gain energy.
     
  14. Offline

    Nate Wiebe

    @Kainzo: Okay, so there are no changes in terms of API. I'm almost positive it's because you aren't using Permissions. Look at the top of the server log and it will complain if permissions does not exist. Is this your problem?

    Released v0.7:

    Fixed a bug with cake. it will no longer give energy.
    Fixed a bug with getting energy by left clicking with food in your hand.
    Added the ability to remove the health bar and only have no energy and full energy messages.

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

    nymm

    Well that was fast.. thank you :) I'll test it tomorrow.
     
  16. Offline

    Nate Wiebe

    Released Version 0.8:
    • Added Hulk mode
    • Cleaned up the code
     
  17. Offline

    prismweed

    simply doesnt function whatsoever. i had the same problem with the previous sprint plugin as well. i host a server and am familiar with permissions and adding plugins as it has alot already and with this one i added the .jar to the plugin directory, added it to permissions for all 4 of my worlds and with the boots on or off and hitting/holding shift the only result i get is my character crouch's. no energy meter, no speed, no anything. reading on the last plugin some people had the same problem for no reason apearently, as it seems on this one as well. looking forward to help/an explanation. thnx.
     
  18. Offline

    Nate Wiebe

    Strange. Are your running the latest recommended build and permissions 2.7? Also are you getting any errors? Lastly if you could paste the startup log into pasteall.org and post here.
     
  19. Offline

    2Bucks

    are there any conflicts with this and Nocheat?
     
  20. Offline

    Nate Wiebe

    No Idea. Give it a shot and let me know.
     
  21. Offline

    Rick

    swimming with sprint doesnt work for me, am i doing something wrong?
     
  22. Offline

    Nate Wiebe

    No you aren't. I forgot to remove that from the plugin description. It was originally a bug, but I fixed it.
     
  23. Offline

    Tim Yong

    Greetings. On CraftBukkit #740 and GoldenSprint 0.8 my console displayed this error after a few minutes:
    Code:
    2011-04-29 13:58:46 [SEVERE] Could not pass event PLAYER_INTERACT to GoldenSprint
    java.lang.NullPointerException
        at com.natewiebe13.GoldenSprint.GSAppleListener.onPlayerInteract(GSAppleListener.java:19)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:254)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:64)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:433)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        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)
     
  24. Offline

    Nate Wiebe

    @Tim Yong: You most likely don't have Permissions installed.
     
  25. Offline

    Tim Yong

    Ah, Permissions is up to date and works great.
     
  26. Offline

    Nate Wiebe

    Can you paste your server log from a fresh start to the first error at: pasteall.org and post here?
     
  27. Offline

    Tim Yong

    I actually have been unable to replicate the error. Very strange.
     
  28. Offline

    Ranzear

    I love CrouchJump, but I want both of your plugins to be active when wearing Leather boots. Perhaps add a teensy config file where we can set what item we want associated with either plugin. Hell, if I could use leather pants for sprinting, even better :D

    Wouldn't boots made of Gold be really heavy and actually slow you down?

    Plugin pitch because I figure you can handle it best: Wearing armor slows you down, wearing no armor lets you move a little faster than default.

    Perhaps you could make a consolidated mod that wearing leather or no armor gives you the running and jumping and heavier armors slow you down?
     
  29. Offline

    Nate Wiebe

    Some good points. I will add toggles for both plugins for all types of boots. This way you can have abilities for multiple types of boots.

    Gold would slow you down, except these are magic boots?

    Sounds like a cool plugin. I actually don't have as much time as I had in the past, but I will see if I can find a bit of time somewhere. That would be another plugin where you can configure armor to slow you down.
     
  30. Offline

    Ranzear

    Well Gold is heavy XD

    I was more or less making reference to Futurama: Leela - "Wouldn't a solid gold fiddle weigh hundreds of pounds and sound really crappy?"

    I have CriticalHits and made golden swords do weak damage but have a very high critical rate and damage, and they're now repaired with Redstone Dust for both economic and 'magical' reasons.

    I more or less just want CrouchJump and Sprinting to be on the same boots, giving more utility to actually making them. I also enjoy the low durability on leather boots making them wear out from fall damage taken.

    I noticed CrouchJump steals a lot of horizontal velocity when it kicks in. I like that, but is it possible to retain horizontal velocity only when sprinting so a sprinting jump could clear perhaps a four or five block gap?

    Your plugins are great and keeping them separate is important, but a little integration, like a double jump while sprinting, wouldn't hurt.

    Gonna drop a double because I had a slightly more specific idea.

    Expand further and allow different configurations for different boots for both plugins. It could be configurable such that golden boots can give a strong sprint but little or no double jump, while leather boots give a good double jump but not as fast a sprint.

    Config could look something like:

    Crouchjump - config.yml
    Item: 317 #Gold Boots
    CrouchJumpHeight: 0.4
    Item: 307 #Leather Boots
    CrouchJumpHeight: 0.7

    GoldenSprint - config.yml
    Item: 317 #Gold Boots
    EnergyUse: 3
    SprintSpeed: 1.5
    Item: 307 #Leather Boots
    EnergyUse: 2
    SprintSpeed 1.2

    This allows different boots to have different speeds and energy consumption rates. A config entry for maximum energy would be cool.

    Perhaps you could integrate CrouchJump to use the same energy system, so a double jump consumes energy.

    Any 'slow down user of armor' plugin you might make should ignore boots.

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

    zerosen

    i am having a problem the plugins.




    i am new to bukkit so any help would be helpful​
     

Share This Page