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 Jul 21, 2013When you fall into the void, you have to wait for you to die :/
Could you please fix this?
-
View User Profile
-
Send Message
Posted Jun 23, 2013@Waffles87
For Permissions I Was Thinking Along The Lines Of Who Goes Into last Stand And Who Doesn't. Being Able To Set Who Can Revive And Who Can't Would Be Great Too.
-
View User Profile
-
Send Message
Posted Jun 22, 2013@Balthjr01
Cool I'll see about PvP Guns Plus; if it's complicated it probably won't make it into this coming version though. What kinds of stuff were you thinking for permissions? Like setting who can revive people and who can't?
-
View User Profile
-
Send Message
Posted Jun 22, 2013@Hanfon
I was thinking of adding a suicide command, seems like a good idea! I will see about /kill, if I can't make it work normally then at the very least I can probably make laststand kill command.
EDIT:
Upon closer inspection, these are the same thing. /kill will now just kill you whether you are already dying or not, as of the upcoming version :)
-
View User Profile
-
Send Message
Posted Jun 21, 2013I Really Like This Plugin And Find It Almost Perfect, But When Using It On My Server I Found That If A Player Is Killed By A Bullet From A PvP Guns Plus Weapon They Flat Out Die And Don't Go Into Last Stand. I Don't Know If PvP Guns Plus Is At Fault Or What, But If This Incompatibility Could Be Fixed That Would Be Amazing. I Was Also Wondering If It Is Possible To Implement Permissions Support. I Don't Want To Come Across As A Demanding Ass, But If You Managed To Do These Things I Would Love You Forever.
-
View User Profile
-
Send Message
Posted Jun 20, 2013Could you add some way to instanly kill yourself? i'mean if u get killed by a creeper or something, miles away of others players its annoying to wait the whole time until u die... btw: could u make it that this plugin dont stops /kill, because they only get in laststand mode if u do this :/
-
View User Profile
-
Send Message
Posted Jun 16, 2013Will wait for this plugin to mature a bit more before using it. Good job!
-
View User Profile
-
Send Message
Posted Jun 13, 2013@Hanfon
You can't at the moment :/ but that's easy enough to work in. I'll include it in the next update.
-
View User Profile
-
Send Message
Posted Jun 13, 2013How can i change the message which appears when the person tries to take another item in hand?
-
View User Profile
-
Send Message
Posted Jun 13, 2013I have to say.. Nice idea! I am going to try it out!
-
View User Profile
-
Send Message
Posted Jun 12, 2013nice plugin idea, i'm yet to test it. i run a very small mob arena server and wanted to know the compatibility of this plugin to mob arena, i.e can you change the health that you have when you get revived.
also a quick suggestion (again im yet to test this plugin) could you make it (it may already be in here just not read it) so if you die multiple times, each and every time you die you get revived, you get brought back to life, worse than the previous revive.
i am another huge call of duty zombies fan and i know this feature is not in normal call of duty zombies, and i feel like some people may not like it so it will need to be a option in the config file.
thank you and by the time i send another response i will have tested it :)
-
View User Profile
-
Send Message
Posted Jun 10, 2013@Mr_Wired
I'll have a look at crackshot to see about compatibility, but otherwise you should be able to set what items you can use while dying in the config once it's included. As for dropping what you're holding, you won't drop anything you're allowed to use while dying (right now that's swords and bows). Other stuff is dropped just because I was just trying to avoid people being able to eat food while dying because the foodbar is currently the timer. Maybe there's an easier way to do this... I'll try!
-
View User Profile
-
Send Message
Posted Jun 10, 2013@HiImEliteDuck
I'll definitely work this in.
-
View User Profile
-
Send Message
Posted Jun 10, 2013Could you please make this work with crackshot so when players are downed they can still use the Deagle? Thanks for this plugin! :D
And could you add in the config the option to not drop anything, I already have the inventory drop control so they'll already lose a portion of their inventory, this might interfere with that plugin.
-
View User Profile
-
Send Message
Posted Jun 8, 2013Excellent idea couldn't of though of any better!
-
View User Profile
-
Send Message
Posted Jun 8, 2013Oh my god! You have no idea how much this will make my server better!
I am actually making all of the zombie maps from cod (and multiplayer eventually) and this plugin will be very helpful for the zombie mode and even other games!
I don't have my server back up until next week, but when it's back I'll use this plugin. and I'll let you know of any suggestions. Thank you so much!
-
View User Profile
-
Send Message
Posted Jun 8, 2013Nice plugin. I have a suggestion though. When a player dies, have a config so that they can only be revived by a certain item, i.e. a piece of paper.
Thanks, EliteKraft