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.
@Bone008
Hi Bone,
Cheza and me have already used that exact syntax yesterday, but it failed. Possibly because DeathControl uses the player's nickname for this purpose. We get a message like 'player not found' on console. We also tried other ways to target the effect to the player, using identifiers like '@p', '@p[name=%victim-name%] '%player-name%', but none of these worked. We hope you or anyone else on this forum can find a simple solution in a working identifier, but it may also require changing the way the plugin identifies %victim-name%.
If we can get this working DeathControl will enable us to define character knockout sequences dependent on the cause of knockout. Note we do not use the term 'player death', but 'character knockout' instead, on our roleplay server. The knockout sequence will simulate a character hospitalization and recovery period and offer the player a brief period to reconsider their past decisions / stupidity. :)
Thanks in advance! Cheers, Alte
@ChezaofStormrage
The correct syntax of the action is
command <sender> <command-string>
, with<sender>
being either "console" or "victim". Since your players probably do not have permission to execute the /effect command by themselves, you need to send the command as "console".Then you need to let the /effect command know which player to give the effect to, which would be the player named
%victim-name%
.The action would then be noted like this:
Let me know if it works, it has been a while since i worked with Minecraft commands :)
Hello! I have a quick question. We are trying to give players an effect on death. However we seem unable to do so. Could you give us a line that may work?
- command effect 2 120 2
We altered this to include victim and %victim-name% among other things.
Thanks in advance.
@Bone008:
Thanks for the reply. It did turn out that Mythic Mobs was the culprit. a recent update has since fixed the failures.
@drexel_levante
I created a ticket for that feature after you had suggested it, but since I have not been actively doing any development on the plugin other than keeping it up to date, it is still not implemented, sorry.
It would take a small to medium redesign of the code to implement cleanly, so I also couldn't just "throw it in" really quickly.
The recent events regarding Bukkit also did not exactly spark my motivation to pick up development again.
Hi there its been a while since ive posted here but was curious on whether or not a feature has been implemented so that death would only affect currently equipped armor and currently selected tool/item in the hotbar but not affect anything else in the inventory.
@adw123
I replied to your forum post.
@Roadhog360
You can create an item list in
plugins/DeathControl/lists.txt
and apply them as a filter in the respective action. Documentation is on the Lists page.Nice! How do I set item filters, I see it nowhere in the tutorial tabs.
Handling:08.08 05:17:35 [Server] INFO awalker520 was slain by a jungle stalker
08.08 05:17:35 [Server] INFO awalker520 died (2 causes: monster, mob); Executed handlings: keep
Thanks!
@JackMcCrafty
That is possible via configuration. You need to create a handling with the "destroy-items" action applied on death. That will simply stop them from dropling and will also NOT return them to the player (unlike "keep-items").
You can define conditions if you want, or you just leave them out so the handling is applied to all deaths.
The Configuration page offers more information.
== Bone008 ==
im making a CallOfDuty Server and want to make it so with deathcontrol, when the player dies they're stuff is DELETED NOT DROPPED, is this done with command or config.
if with config, how?
@Bone008
Sorry I did not report back on this issue, but I did figure out a work around that works very well. I just duplicated the death handlings and gave them different names and then used a different condition per each world.
Here are my handlings settings in case this could help someone else.
Death:
priority-order: 1
timeout-on-disconnect: 15
cancel-message: &cYou don't have enough money!
conditions:
- world world
actions:
- keep-items
- charge 10% min=1 max=1
- message %plugin-prefix%Hey &e%victim-name% &f%death-cause-formatted%
- message %plugin-prefix%Total cost to save inventory = &c%money-paid%
Deathnether:
priority-order: 1
timeout-on-disconnect: 15
conditions:
- world world_nether
actions:
- keep-items
- charge 10% min=1 max=1
- message %plugin-prefix%Hey &e%victim-name% &f%death-cause-formatted%
- message %plugin-prefix%Total cost to save inventory = &c%money-paid%
Deathend:
priority-order: 1
timeout-on-disconnect: 15
conditions:
- world world_the_end
actions:
- keep-items
- charge 10% min=1 max=1
- message %plugin-prefix%Hey &e%victim-name% &f%death-cause-formatted%
- message %plugin-prefix%Total cost to save inventory = &c%money-paid%
This allows DC to only activate in those worlds and no other worlds. With this method, this plugin is now running beautifully other than I am having issues with keeping xp, it keeps doubling all of a sudden so I removed it from this config, I am trying to figure out which plugin is causing the issue, because it was working fine before and then I added many plugins so thats kind of my bad there.
The best plugin ever! Saludos desde Argentina!
@IrParadox
I have to apologize, the setting
disabled-worlds
is actually not working as intended as of v2.1.0. The reason is a one-year-old mistake I made: The plugin is actually expecting the config setting to be called "blacklisted-worlds
", but I named it incorrectly in the default config and documentation. More information in this ticket.@Powercows
Thanks. The "death chest" feature has been popping up as a request every now and then, but I have unfortunately stopped developing new features for a while. I do support the idea, though, so I will add a ticket for it in case I ever get around to continuing active development.
very cool plugin, love all the conditions.
one thing would make this thing more awesome for me.. add teh ability for death chests or signs like deadmanschest ... on top of the other things.
I want to just give back my buds their crap when accidentally killed by my wolves. but I want them to have to run for their items otherwise but i also want their items protected from lagg clear auto clearing.
Your plugin is perfect for this, but needs a death chest or something to protect the players items.. instead of just "drop"
@IrParadox
The
world
condition does not accept multiple worlds on the same line. Putting multiple of whitelisted worlds in a condition would also NOT work, because the player would have to be in all of them at the same time.However, you can invert the condition and use your blacklisted worlds again:
(Note the "-" sign in front of "world")
This would disable the handling when the player is either in "MiniGames" or in "Flat".
Ok so if I use: - world world In the conditions, it works for the overworld only and no other world which gets me closer but. if I do: - world world world_nether world_the_end It does not recognize the nether or the end worlds. I also set up some simple aliases and tried using them with no luck. So, does anyone know what I am doing wrong here? Any help would be appreciated, this is my final puzzle piece before the server goes live.
Ok Bones... I am getting closer to figuring this out. How are the world conditions used? would it be - world world to add say the main world to the list of conditions? Or is this format incorrect? I have added it into my conditions for death, but it seems to have disabled in all worlds. Which I feel is a step closer to resolving my issue. Which I have traced back to MultiInv but with a few tweeks I think they will play nice. So long as this condition of world works and I am just currently using it wrong.
@Bone008
All my players are affected by it and I have no aliases in place. I was really hoping you would say that I did something wrong. lol Well thanks for you time, it is much appreciated. I will play with a few of the other plugins to see if they might be causing the issue.
@IrParadox
Please use
<<code>>
-Tags next time to make things more readable (or set the "Markup Type" to Plain Text).One thing I noticed was that you have set
disable-permissions
to true, which gives you as an operator thedeathcontrol.nolimits
permission (this is only partially intended behavior). So as an OP you are bypassing the disabled-worlds setting.Try testing it as a non-operator.
If regular players are affected as well, you might want to check if the world's real names match the ones in the config. Maybe they are just aliases? Other than that, I can't detect any issues in the config.