LastStand
LastStand
Inspired by the last stand perk in CoD; revive your friends before they die!
When you long for those near-impossible mid-battle revivals of your fallen comrades; this plugin attempts to recreate those few moments between life and death wherein a brave friend might be able to save you...
As of 2.1.8, items used to revive someone will be consumed. This can be toggled off with the "items_used_up" config.
Source Code
At github: https://github.com/waffles87/laststand
Features
"Last Stand Mode" (a.k.a. "dying mode")
When your health reaches 0, you will enter "last stand mode", which is a state of "dying". The food bar will slowly run out, and you will die when it
expires unless you are revived by another player. Players can revive dying players by right-clicking them.
When you enter last stand mode you:
- Have your health set and stuck at 1/2 a heart.
- Drop whatever item is currently in-hand unless it's configured to be allowed (defaults to swords or bow).
- Do not drop any other items.
- Receive a message saying you are dying.
- Broadcast a server message to all players OR to all *nearby* players saying you are dying.
- Are un-targetted by nearby monsters.
In last stand mode you:
- Slowly lose your food bar; when it expires, you die and drop everything normally.
- Cannot take damage or be killed by mobs.
- Your foodbar can now 'take damage' from other players (PvP).
- Your foodbar can also 'take damage' from configurable damage types (e.g. falling).
- Can still attack and break blocks with configurable allowed items.
- Cannot be targeted by monsters.
- Move at a very slow speed.
- Give off smoke, ender pearl effects, and appear to be sneaking.
- Periodically broadcast a server message OR broadcast to nearby players saying you are dying.
- Are affected periodically by spots of blindness.
- Cannot pick up any items. EDIT: this was broken but is fixed as of v2.1.6
- Cannot change items except to configurable allowed items.
- Cannot eat food or consume potions.
- Can be revived by a player right-clicking you.
Upon revival you:
- Have health set to a configurable amount.
- Have your impairing effects restored; speed, vision, picking up/using items.
- Do not automatically recover the item you may have dropped.
- Do not automatically recover food points.
Disconnecting while dying:
- You immediately drop all of your items for anyone to take.
- A server message will be broadcast telling everyone that you dropped everything.
- Upon re-joining you will be dead and must respawn.
Installation
- Put LastStand.jar in your plugins folder and run your server; it will generate the default configs.
- When updating to a new version, delete the config file before running your server so that a new one will be generated.
Commands
laststand.revive <player> [quiet|silent]
ls.revive - convenience command
- This command will restore a player to normal if they are in LastStand mode (if they are "dying") with full HP and food.
- If you specify "quiet" then the sender will receive a success message but the player will not.
- If you specify "silent" then no success messages will be sent.
- If you specify neither silent nor quiet then the player and the sender will receive a success message.
- The permission for this command is laststand.revive_command and it defaults to op only. It is not included in laststand.*
(The idea behind this command was to give admins a last-ditch way to avoid players being stuck in LastStand mode because of some event incompatibility around the death or spawn events.)
laststand.reload
ls.reload - convenience command
- Reloads the LastStand configs.
Permissions
Permissions have been added as of 2.1.0.
- laststand.dying_mode allows a player to survive when they would have died so someone can revive them.
- laststand.revive_other allows a player to revive someone who is dying.
Both of the above default to true.
As of 2.1.4:
- laststand.revive_command allows for the use of the laststand.revive <player> command (see above). It defaults to op only.
As of 2.2.0:
- laststand.reload allows for the use of the laststand.reload. It defaults to op only.
Configs
Config file has been added as of 1.1.0; install the plugin in the plugins folder and run your server once, and the plugins/LastStand folder should be generated containing the config.yml. The config file itself includes many comments and is pretty self-explanatory.
The following features are configurable:
- Message text displayed to player and those broadcast to server/nearby players when someone begins dying, periodically while dying, or is revived.
- Above messages can be toggled on and off.
- Dropping of all items if a player disconnects while dying can be toggled off.
- Items you can use while dying (you will also not drop any of these when you first start dying).
- Items required to revive someone.
- new: toggle consumption of the item used to revive someone on and off
- Movement speed while dying.
- Timer length.
- Some acceptable damage types; whether they will allow you to be revivable AND whether they will hurt you when dying.
- Health restored on revival.
- Some options as to when a player will be automatically removed from dying mode; on teleport, on death, on respawn.
- Basic world support; which worlds will LastStand work on.
Targets for Future Release
Drawing Board
- Separating the timer from the food bar to decrease incompatibility with other plugins.
- Increasing the time it takes to revive someone (more than just one right-click).
Known Issues
- Certain minigame plugins that use team spawn points seem to be incompatible in that players will be stuck in last stand mode when they respawn.
- Players are able to pick up items while dying as of 2.0; this is fixed as of 2.1.6.
- See the ticket regarding compatibility with AntiCheat.
- Anything that replenishes your foodbar without eating (such as the "food" spell in MagicSpells) makes it possible to remain in "last stand mode" indefinitely.
- Anything that cancels damage (such as the "leap" spell in MagicSpells) may interfere with the damage-cancelling that occurs right before "last stand mode" is activated, resulting in death.
- Sometimes if death occurs for any reason other than the food bar expiring (or disconnecting) in "last stand mode", you will still be in "last stand mode" upon respawning. You should be revivable, but a disconnect should always reset you. Also see the laststand.revive <player> command.
- When the PvP option is turned on, arrows may rarely bounce off of a player when they enter LastStand mode and hit someone else.
- Very rarely, LastStand mode fails to activate when damage is taken from players or mobs and the player will simply die.
-
View User Profile
-
Send Message
Posted Sep 28, 2013how long do u thing it will take to make it so if u run out of food instant death doesnt happen? thats the only thing stoping me from using this plugin on my server
-
View User Profile
-
Send Message
Posted Sep 23, 2013thanks for adding the multi world support
-
View User Profile
-
Send Message
Posted Sep 17, 2013@Waffles87
=== Ha! We will see about that! ✌ ===
-
View User Profile
-
Send Message
Posted Sep 17, 2013@scott19062
Cool idea, I'll see if I can make it happen.
-
View User Profile
-
Send Message
Posted Sep 17, 2013could you add multi world support so you could use it in only one world
-
View User Profile
-
Send Message
Posted Sep 6, 2013@jaystar411
Thanks for pointing that out; I still have to get around to realistic behavior for the less frequent causes of dying.
@ycpro
Well I'm glad there's at least a partial solution, sorry it's ugly.. So you say they enter LastStand again after leaving the spawn- do they still enter LastStand and tick down before they die and respawn? Because that seems like they enter LastStand twice now.
-
View User Profile
-
Send Message
Posted Sep 5, 2013Players are still stuck in Last Stand mode in v 1.2.4. They used to spawn at their team's side in LastStand mode, but now they spawn with full health and go into LastStand mode directly AFTER leaving their team's spawnpoint. Players are invincible while they are still in spawn in War. Maybe this has something to do with it? Anyway, the new version's options for broadcasting the messages is pretty neat and I think this plugin will add a whole new depth of strategy to pvp once it's complete. Thanks Waffles. EDIT: I have sorta found a way to handle this problem- I got a plugin called commander that lets me add commands to pressure plates. I then surrounded the spawn by pressure plates and set the command on these pressure plates to laststand.revive @player and got them to run on the console. So, whenever the player leaves they step on a pressure plate and are revived by the console.
-
View User Profile
-
Send Message
Posted Sep 4, 2013Don't know if u already know that but i die if the food bar turns to 0 without being in the "last-stand" mode.
Made a short video to explain it better. I like the way how it is but maybe people want also to change that
http://www.youtube.com/watch?v=IqdHrIvvbA8
-
View User Profile
-
Send Message
Posted Sep 4, 2013New version out; hoping to get a release version out soon, after any bugs come back from this one!
@BrennoBot
Thanks! Hopefully the gun isn't misleading... >=)
@jaystar411
Great idea! It's included in 2.1.4 and seems to be in tune. Give it a try and please let me know if any wires are crossed.
@ycpro
Hopefully it's fixed now, as LastStand mode is no longer dependent on the death event, which I suspect was somehow being cancelled or something with the team spawn points. If not, that new op command might be some help if you can automate it; I think there is a plugin like autocommands or something that lets you run commands on certain events, like maybe on spawn or if they walk over the spawn block.
-
View User Profile
-
Send Message
Posted Sep 1, 2013Nice plugin i like it!!! But is there a way to add a range message instead of a global broadcast message? Like if someone gets in to the "last stand" it will be displayed 20 block around the wounded player. :>
-
View User Profile
-
Send Message
Posted Sep 1, 2013== Great Job! Works Great on my Trouble In Mine Vile! Take This: ==
-
View User Profile
-
Send Message
Posted Aug 27, 2013@ycpro
Hmm ok. I'll have to take some time to figure out how War and other spawn point plugins work. Thanks a lot for your feedback; I hope I can make it worth your while!
-
View User Profile
-
Send Message
Posted Aug 27, 2013Tried turning it off. It's still happening. Doesn't seem to be related to the pvp option.
-
View User Profile
-
Send Message
Posted Aug 27, 2013I am running the latest Last Stand version for 1.6.2, the one you released approximately 10 hours ago. I did have the pvp option on as I thought it would be impractical to turn it off in a warzone. I'll try turning it off to see if it works. Thanks a ton!
-
View User Profile
-
Send Message
Posted Aug 27, 2013@ycpro
Thanks! I can think of a few reasons for this problem, first being you might be using an older version of LastStand in which getting "stuck" in laststand mode was a frequent problem (happened up until 2.0). I did say I might put out a final version for minecraft 1.5.2 but I haven't yet. Another possibility is that these minigames that let you respawn at a spawn point have event priorities that interfere with LastStand, or maybe you have the PvP option in the config turned on which is really still in alpha and may simply have a glitch that is independent of the minigames. Anyway I'll look into it further; can you tell me what version you found this in and/or if you had the pvp option on?
-
View User Profile
-
Send Message
Posted Aug 27, 2013This plugin is awesome!!! One minor problem- it doesn't work well on minigames that make players spawn in a specific location upon death. For example, on "War", whenever a player dies they respawn at their team spawnpoint and are still in Last Stand mode. Thanks in advance.
-
View User Profile
-
Send Message
Posted Aug 24, 2013i'd love t see permissions :)
-
View User Profile
-
Send Message
Posted Aug 21, 2013@Stykernag
It is in the works, it is not forgotten! I have no excuse.
-
View User Profile
-
Send Message
Posted Aug 21, 2013This plugin is amazing. I just hope it gets updated!
-
View User Profile
-
Send Message
Posted Jul 23, 2013@Tony556
Sorry I've been busy and haven't put much time into upkeep. Better support for /kill has already been developed for situations where you're just waiting to die, but I got hung up on the pvp option and 1.6 came out before I uploaded the new version. I'm planning on getting this working on 1.6 when I can. I may put out an incomplete final version for 1.5 (which would include the better /kill) if it doesn't seem too messy.