StaminaDrain
Overview
A must-have for survival servers: The current hunger system has it so that a player does not lose stamina while standing still. This is a small plugin that decreases the player's stamina level at a constant rate, even while standing, and is compatible with the current stamina system. For example, if a player is sprinting, s/he will lose stamina from sprinting as well as from the StaminaDrain plugin. The reason for this plugin is to increase the difficulty on server, as well as to put a greater strain on the food supply.
Configuration
drain-rate: The rate at which stamina is drained in seconds.
water-benefit: The amount of saturation a player will regain after drinking water from a water bottle.
exhaustion-enabled: Whether or not the following exhaustion modifiers will take effect.
walking-exhaustion: The amount of exhaustion a player gains while walking.
sneaking-exhaustion: The amount of exhaustion a player gains while sneaking.
sprinting-exhaustion: The amount of exhaustion a player gains while sprinting.
swimming-exhaustion The amount of exhaustion a player gains while swimming.
jumpng-exhaustion: The amount of exhaustion a player gains while jumping.
sprintjump-exhaustion: The amount of exhaustion a player gains while sprinting and jumping simultaneously.
breakblock-exhaustion: The amount of exhaustion a player gains when they break a block.
attack-exhaustion: The amount of exhaustion a player gains when they attack an enemy.
damage-exhaustion: The amount of exhaustion a player gains when they receive damage.
Note that the exhaustion modifiers are in ADDITION to Minecraft's default exhaustion system. Therefore, if you set walking-exhaustion to 0.01, the result in game will be 0.02 exhaustion gained per meter of walking (default = 0.01).
Example config:
#Customize the rate at which stamina is drained in seconds. #Example: # #drain-rate: 120 # #This will make it so a player loses .5 stamina (food level) every 2 minutes. #Default is set at 2 minutes. Set drain-rate to 0 if you wish to disable stamina draining. drain-rate: 120 #Customize the amount of saturation a player will receive when drinking water. #Example: # #water-benefit: 10 # #This will allow the player to regain 10 saturation when they drink water from a water bottle. #Set water-benefit to 0 if you wish to disable this effect. water-benefit: 10 #Customize the amount of exhaustion a player accumulates while performing actions. #These values are in ADDITION to the Minecraft default values. For example, walking normally takes 0.01 exhaustion per meter. #If walking-exhaustion is set to 0.01, the new exhaustion level for walking will be 0.02 per meter. #To turn off individual modifiers, either set them to 0 or delete the line. #To toggle all the exhaustion modifiers at once, set exhaustion-enabed to true or false. #If exhaustion-enabled is false, none of the exhaustion modifiers will take effect. #Example: # #exhaustion-enabled: false #walking-exhaustion: 0.01 #sneaking-exhaustion: 0.01 #sprinting-exhaustion: 0.1 #swimming-exhaustion: 0.015 #jumping-exhaustion: 0.2 #sprintjump-exhaustion:0.8 #breakblock-exhaustion: 0.025 #attack-exhaustion: 0.3 #damage-exhaustion: 0.3 # #This will make every action take twice the amount of the normal exhaustion. #For more information on exhaustion levels, see http://www.minecraftwiki.net/wiki/Hunger#Exhaustion_level_increase exhaustion-enabled: true walking-exhaustion: 0.01 sneaking-exhaustion: 0.01 sprinting-exhaustion: 0.1 swimming-exhaustion: 0.015 jumping-exhaustion: 0.2 sprintjump-exhaustion: 0.8 breakblock-exhaustion: 0.025 attack-exhaustion: 0.3 damage-exhaustion: 0.3
Current Version
3/10/13 Version 1.4
- Drinking water from water bottles restores a configurable amount of saturation.
- Added configurable modifiers for exhaustion levels for walking (per meter), sneaking (per meter), sprinting (per meter), swimming (per meter), jumping, sprint-jumping, breaking blocks, attacking enemies, and receiving damage.
This plugin doesn't seem to work on 1.6.2
I want my players stamina to go down when they are running but then "recharge" when they are not sprinting
And also have it were food does not effect the food bar
Is this possible
@diannetea
Sure. I must have overlooked this because I've never encountered a survival server that has creative mode. I'll add it in the next update.
I have a creative world and I use GameModeInventories (which should keep the bars completely separate), but my users have complained that when they go back to the regular world their hunger bars are empty and often die as a result. Is there a way to disable this if someone is in Creative?
@diannetea
Glad to hear it!
Cool, my afk plugin auto kicks at 15 minutes so I think that'll work out just fine :)
@jhs232
I don't get what you're trying to say because the hunger bar is essentially your stamina.
@diannetea
I'm not going to add an exception for afk players, because this plugin is also supposed to discourage people from afking. If they leave for a couple minutes, it's no problem if they lose a bit of hunger. At the default drain rate (2 minutes), a player would have to be afk for 40 minutes to start loosing health from hunger, assuming they start off with full hunger. If they're going to be gone for 40+ minutes, they should have just logged off.
Wow, this plugin seems amazing! What I've always wanted was a stamina plugin that uses spout to add a stamina bar to the game! It would be amazing if you could add spout support, and make it so the plugin would do that if you have spout!
Could you add something for afk players? I'd like to add this but I don't want to punish people for having to leave the computer for a few minutes
If you don't move for 1 minute pause it or something?
Possible to make so you lose 3x more while swimming ?
This is exactly what i was looking for, thanks!
@manyamile
It'll be updated soon and thanks.
We were thinking about adding some configurable options, but left it at a rate that wasn't too hard or too easy on people.
I understand that food is too easy to get and thinking on more ways to make the game a bit more challenging without changing it too much.
This is a great idea! I installed this on my hardcore server last night and ran some tests. I'm running MC 1.0.1 and CB build #1597. I understand that your release may not be fully compatible with that and my findings may not be accurate.
During testing, I found that it took about 11 minutes of normal game play (sprinting, swimming, building) to starve to death. That's far too long in my opinion. I'd like to force my players to eat several times per in-game day (like 4-6 chickens per day). Right now, it's still way too easy to make a huge stack of cooked food and go about your business.
If you're planning to expand this plug-in further, I'd love to see a significant reduction of stamina over time and possibly even let server admins customize the per event stamina loss (make sprinting, jumping, and mountain climbing extremely strenuous).
Could you make it so that if a player sleeps, they lose a significant amount of stamina(50-75% maybe) I always though there should be a penalty to sleeping, and waking up and having a meal seems quite natural anyways.
Well was talking about decreasing, but if it's just a number multiplier, doing .5'd be the same as 2 or whatever other number. Could just have the multiplier in a config file and use that for scaling the stamina drain of actions.
@sintri
I'll look into it. Are you talking about increasing the amount of stamina already lost per action (such as sprinting, jumping, etc.)?
Since you seem to be the only hunger plugin that actually does anything to the stamina/hunger bar. Any chance you could get a variable stamina/hunger decrease for each action? Like a multiplier for the stamina decrease?