DeathControl
Overview
This plugin is a powerful tool to control what happens when players die. Its primary feature is to allow players to keep their inventory, but by now it offers plenty of more possibilities about what to do. You can set conditions that have to be met and actions that will be executed.
Flexibility is one of the main objectives of the plugin. Whether you want a simple way to keep inventories, you want enchanted pickaxes named "Pink Elephant" to be destroyed upon death or you just want to change PVP deaths - this plugin makes it all possible.
Main Features
- provides a powerful way to set up handlings for player deaths
- create different behaviors depending on how and where the player died
- able to save a player's inventory, experience and/or food level upon death
- destroy or damage items upon death
- allows item filters to affect only certain items
- economy support: charge them money for it!
- waiting for the player to perform a command can give them the choice of what to do
- disconnecting players are treated with a timeout
- supports every major economy-plugin through Vault or Register
- uses regular permissions system or the OP system
- flexible messaging system that allows localization and customization
- hooks into the API of MobArena and BattleArena to fix deaths in an arena
Donate
If you want to support the development of the plugin, feel free to drop a donation! It really helps to keep this plugin alive. Thank you :)
Pages
- Configuration
- Commands
- Permissions
- Changelog
- FAQ (Frequently Asked Questions)
- Source code
Setup
- If you want to use economy plugins, you need to have Register or Vault installed as a plugin.
Just download the jar from the linked page and put it in yourplugins/
folder, if you haven't yet. - Drop the plugin's jar in the
plugins/
-directory of your server (just like every plugin, eh?). - Start/Reload the server once to generate the configuration files at
plugins/DeathControl/
. - Read the instructions on the Configuration page for config information!
- Make your adjustments to
config.yml
andlists.txt
as you wish - Reload the config files either through reloading the server or, easier, with the command "
/death reload
" - Enjoy the plugin!
Dependencies
The plugin is functional without any other plugins.
To be able to use the "charge" action (and thus make players pay money), you need one of those plugin libraries so this plugin can make use of your installed economy plugin:
One of them needs to be installed as a plugin on your server.
Reporting an issue
If you think you found an error with the plugin:
- Read the FAQ. It might be a common incompatibility.
- Go to the Issues forum and check if the issue was already posted/answered by another user.
- If not, create a new topic in that same forum and describe your issue precisely. Always post your craftbukkit version, plugin version and if relevant your config file(s).
Please do not report issues in the comments! Only use the forums!
To-Do
This section is now represented by the Tickets tab.
Okay, since it was requested so often, I now added multiworld support.
It supports restrictions for cross-world respawns as well as limiting the plugin to only work in specific worlds - of course both only happens if you configure it like that.
There are also permission nodes to bypass those restrictions. Take a look at the Configuration page to learn how to use the new features (they are more or less straight-forward, the config file automatically gets the new nodes added).
While the file is awating approval, meanwhile a direct link: version 1.7
Sorry, due to real life circumstances, I'm not able to spend much time working on new features. There is so much that could be added. I'll have to focus on keeping it stable, though.
Oh, and thank you all for all the great feedback, it is much appreciated :)
I know it is on the to do list, but I would also like to suggest per world support. Right now players can die in creative world, go to the survival world, and type /death back and they will get their items back, which is not ideal for a legit server.
Using the automatic 100% keep method players frequently will lose a item or two when they have a full inventory and are wearing gear.
I believe the issue is that items are not equiped 1st before rest of inventory is restored.
Awesome plugin, if I could request one thing though... per world support please? If it's too hard I can make do without :-)
Thanks again!!!
Feature request: Run a command as the dead player when he dies by certain causes.
@dabomb665m
I just figured out a possible cause and solution for that issue right here. If my assumption is the case, I will hopefully be able to fix the problems.
Stay tuned for an update :)
EDIT: The update is out. The file still needs to be approved, meanwhile a direct link to it. I hope this fixes the issues!
@ryvix
Yeah, Unfortunately, I have moved over to the "scavenger" plugin for my server. I love the death control features 100% more because of it's customizing drops/returns for each death type (specifically useful for pvp). However, I just can't be bothered giving people back items every other day due to the random item disappearings.
Apparently the login/logoff or/title screen button thing isn't isolated to just people with spoutplugin. However, for my specific case, having spoutplugin, dying, quitting/logging/x-ing out of the window before choosing respawn = 100% item loss(unless people don't use /death back when they log back in, in which case the items just drop on the floor after the set amount of time).
Anyway, I really hope whatever the issue is, it will be tracked down. I would very much like to switch back to death control
@dabomb665m
I have this same problem but they said they accidentally click the Title Screen button instead of Respawn after they died once, unlike the problem mentioned on the forums. I don't see them dying twice and I don't have SpoutPlugin installed. They can't get their items back either with /death back. How can we get these back when they log back in rather than waiting because I set my timer to 24 hours since I want it to try to wait until they log back in. Is it stored in their player dat file or some place? Or is it just gone? Thanks!
Im having a problem with MobArena. When a player dies in the arena the player is dropping xp orbs (normaly they just lose 25% on death and DONT drop them) and DeathControl is saying:
Any way to fix that or is that a MobArena problem (mobarena guys are saying its not a mobarena problem *sigh*)
I have an idea for this plugin.
I have a pvp arena, and I have been having a tournament. 1 rule is that when a player dies, they are allowed to keep there stuff. In order to do this, I have to look at their inventory, write it down, and make sure each person gets there stuff back.
Now, this plugin would work for that. But I was looking for it to be region specific. I have the pvparena set as a region using worldguard. It would be great if your plugin can work in certain regions, and then be turned off when outside said regions.
For now, I think I will use this plugin while doing the tournament, and then uninstall when its not happening. I just thought Id throw that suggestion out there.
But great plugin non the less. Thanks for your work!
@Bone008
Hi again Bone008,
For some reason, even if the items are set to "command" (manual /death back), death back still gives nothing back
What happens is:
-Player dies;
-Player disconnects (before respawn);
-Player Logs in;
-Player Respawns;
-Player uses /death back (no items, no confirmation or deny messsage);
-Player uses /death back again (/death tells you that no items are saved);
Edit: further testing. If I repeat the process listed above but upon relogging in, I don't use /death back... the items will drop on the death spot per the disconnect timeout setting set in the config.yml... so it's definitely /death back and authme somehow putting the inventory in limbo after relogging in. For some reason /death back just doesn't trigger any message. Do you have an idea of where the problem might be occurring if its not notifying the player? (again, first /death back after login = silence + lost items forever. second /death back after login = no items to get back. No /death back after login = items drop on the floor)
Update: It's not AuthMe. It's actually spoutplugin. I'm using the latest recommend build of spoutplugin. I'll have to head on over there to ticket the issue. In the meantime... any ideas as to why /death back doesn't work after logging in with server-side spout?
@lusse1995 Already on the To-Do list, not sure if I'll do it soon.
@dabomb665m Supposedly AuthMe wipes the inventory on login before you auth yourself. So when the items are given on respawn after logging in, AuthMe still blocks that. Only option I see is to use the command method to restore items. Then the player has chance to do the auth command before getting back the items. Or set your server to online mode ...
@Bone008
Hi Bone008. I'm having some problems with your plugin and another plugin conflicting with each other. The problem comes from AuthMe. I'm not sure what exactly your code and his code is doing with the inventory but here is what happens:
If player dies and lags out before pressing respawn (maybe from a crash or internet lag etc), the inventory is completely gone when they come back. I know Deathcontrol has a "grace" period setup for those who disconnect, but that doesn't seem to trigger because somewhere along the lines, AuthMe takes over. When the player finally gets back and presses "respawn", death back has no inventory... and the items are never dropped(at the location of the death).
Any idea how I can circumvent this?
Can you make a option to choose the death message and if you want it or not. Thanks.
@drdeft
Cross-world respawns with separate inventories are a problem, I agree. However, I don't want to hook MultiWorld as a specific plugin (there are also other plugins providing multiple inventories so it wouldn't work for everyone). For a "quick fix", I think I'll add a rudimentary option that allows you to disable the plugin when the "respawn-world" isn't the same as the world where the player died.
Oh, and you can also prevent this to some extent by yourselves: When you know for sure that players will respawn in another world when dying in world X, you can simply remove the
deathcontrol.use
permission node in that world (Permissions plugins usually offer world-specific permissions). Of course, that doesn't work if the respawn location can possibly be in the same world (for example, it could depend on the player's home).@FeedDante
Currently, there is no way. Please look at this thread where the same feature was suggested. I like the idea (it even used to be in the plugin before it became as complex as it is now), I just need to finally get to implement it.
@KnightsOfTables
Wow, I've never thought of naming it like that. Now that makes actually (sort of) sense, I'll take a look at it!
@lusse1995
Setting
keep-experience
to true for the death cause should have that behavior. It should not drop any experience orbs and give you back the same amount of xp that you had before (or less, if you changedloss-percentage
).Hi, Is there some way you can prevent the experience orb from droping cause I want to use this plugin so I always have my. But if I go to my death point I can still pick up experience and add that up. Thanks.
I am also having the issue of players being given their inventory in the incorrect world. I use multiverse inventory to separate inventory between a survival and factions world. It seems the items are always refunded in the factions world.
@KnightsOfTables
Agree, I need this too =)) Account Bankir =))
@Bone008
The feature could be, which account does the money go to? As in:
And the default could be to pay to server as it currently is :)
Is there any way to preserve the order of items in one's inventory? I'm sort of meticulous about how things are ordered and I don't like having to rearrange all my items after I die.
If the answer is no, would you actually be interested in this feature? I would be happy to take the time to get this worked out and send a pull request on GitHub but I want to make sure you'd be interested in it first.