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
Every time i loginto my server with DeathControl it has this warning thing saying
=====Warning======
the gamerule "keepinventory" is enable in world "pvp"!
this breaks DeathControl by overwriting its functionality,
Please disable the tule with the following command:
/gamerule keepinventory false
=================
This should not be a problem since i've set the plugin to ignore world "pvp" is there any ways to fix it? because world "pvp" is supposed to be a keep inventory world.
@Bone008
W8 but i thought the "message" written in actions would only pop up after the stuff have been confirmed? or is it like:
- action 1
- action 2
- action 3
and it shows up and confirm it in order?
[looks weird, with 2 messages just one at the beginning one at the end...]
==========================config============================
handlings:
defaultForEveryone:
cancel-message: '&c物品掉落在了你的死亡地点!'
actions:
- message '&c如果你掉落了非常重要的物品,可以用命令&a"/death back"&c花费$198将物品取回!30秒后物品将自动掉落...'
- wait command 30s
- required charge 198
- damage-items 20%
- keep-items
- keep-experience 75%
- message '&a你花费了$198并取回了自己的物品和75%的经验.&c你的物品损坏了20%!'
@Bone008
just tht... you should make an example for them, or at least explain the stuffs in the '<>' a bit more =] ya now i get it... thx XP. This plugin is very configurable, and useful, nice work =]
(i'm sure tht this plugin would be one of the most used plugin in the future, if you can contact people like the guys in woopa gaming or wotever their name was... and let them make a plugin showcase)
@MikeGold I'm trying to make it as understandable as possible, but apparently that is not the case for everyone right now.
@Thenciouse Sorry, I don't understand. What is the complicated part of the description of the
command
action?All actions look the same, you start with the name of the action and you can specify space-separated arguments. These arguments are written with the <> thingies in the documentation.
So "command <sender> <command-string>" would for example let you write:
Which would execute the command "say Hello World!" as if you had typed it into the console when the player dies.
Aaaand no, "/death back" has never teleported you anywhere, its only purpose is exactly what you want: Confirm to pay to get back your stuff. It never says anything else on the Commands page.
You are confusing it with Essentials' "
/back
" command, which teleports you.This plugin is not Essentials and has nothing to with it!
You action setup would look like this (of course you can leave out the "message"):
@Bone008:
I dont really get how that wait command would work. since my server banns all /back commands because we want players to pay to get their items back with your plugin. is it possible for me to make a simple command that confirms all the actions so that players can agree on paying??? doesnt the /deaths back command tp you to your death point or smthin?
@MikeGold
Hahaha, exactly! (again)... the guide is pretty complected and vague, like this one that i wanted to use:
command <sender> <command-string>
Executes any command as the victim or the console.
<sender> can be "victim" or "console". <command-string> is the command to be executed including parameters (without a leading /).
Variables can be used here.
Succeeds: only if the command that should be executed existed; Note that this can't detect if the plugin owning the command was able to process it correctly.
i really had no idea what to do after reading this guide over and over again >_>...
but the plugin is pretty damn awesome =]
@Bone008
Thank you for your help. You were obviously right. After deopping myself and removing from the group of admins everything worked allright and the script alterations gave me the right results. The plugin is great, but the configuration guide needs a little bit of work ;].
@Thenciouse
About the command part: Yes, that is possible. Insert a "
wait command [timeout]
" action as the first action in your handling.@MikeGold @Thenciouse
About the experience problem: I think you might be using the Essentials plugin and its "keep experience feature. I don't know much about it, but with the permission node "essentials.keepxp" it gives you back your experience as well.
Combined with DeathControl, it gives back XP twice. I prevented that from happening in a fix once, but unfortunately forgot to reimplement it in the new v2.0.0.
Try the following:
keep-experience
action from DeathControl and see if you still keep some experience.essentails.keepxp
permission node. It might be defaulted to true for OPs, I don't know.@MikeGold
Regarding "damage-items" and stuff: In your case, order of actions is important. It's briefly mentioned on the Configuration page, but probably not very clear.
damage-items
affects items that are dropped. Sincekeep-items
stops those items from being dropped, the damage-action doesn't do anything (it just operates on the rest of the items). You have to putdamage-items
beforekeep-items
.It's a bit confusing, I know. Maybe I should look into a way to make order redundant. But this way, you could intentionally e.g. keep 50% and only damage the other 50% that are still dropped.
Anyway, I believe your
keep-items
kept-percentage setup is also not what you want to accomplish. Right now, you actions look something like that:keep-items !armor 85%
" :)In the end, your config should look like that:
@MikeGold
Exactly...However damaging of items is working for me, just not the exp. i'm not sure about the keep inventory cuz i'm only using 100% keep
I'm using DeathControl v2.0.0 and server 1.6.2.
Everything works as it should, except the exp. It's added instead of deducted. Here is a part of my config:
Edit: It seems that it does not damage my sword or any other items in my inventory and I'm always keeping 100% of items as well.
@Bone008
Sup Bones~ I've been trying out the plugin but... well... there are 2 problems...
first of all, the EXP, even though it's set to keep-experience 75%, players seem to receive more EXP than before (i'm using 1.5.2, and DeathControl 2.0.0) so i'm guessing it's a compatibility issue?
Secondly... this charging is automatically enforced, which isn't really wot i anticipated... is there a way of making the charging and restoring require a command or some sort?
thx~ =3 and here comes the config file i'm using currently:
# ====== Settings for DeathControl ======
# IMPORTANT: Do NOT use tabs in this file! Only use spaces!
#
# Documentation on how to set up this configuration can be found here:
# http://dev.bukkit.org/bukkit-plugins/deathcontrol/pages/configuration/
disable-permissions: false
logging-level: standard
multi-world:
allow-cross-world: false
disabled-worlds: [pvp, activities, creative]
handlings:
defaultForEveryone:
cancel-message: '你的钱不够了!物品掉落在了你的死亡地点!'
actions:
- required charge 198
- damage-items 20%
- keep-items
- keep-experience 75%
- message '&a你花费了$198来取回自己的物品和75%的经验.&c你的物品损坏了20%!'
@Bone008
well~ i could add the permission into the pex file, but since everyone is the same there would be no use. but if i set it to disable permissions, it's not gonna allow them to use other cheating permissions right?
and erm... ya i tried UTF-8 w/o BOM, didnt work, still said special character (OXFFFD) or smthin... i might try solving it later, dont worry about this part =]
ur a nice guy~ thx for the help, it's like 4:07am here in china... got to sleep =P night~
@Thenciouse
disable-permissions
" to true in the config (I think you would manage that much ;) ).- Make sure the file is saved as UTF-8 (use Google if you don't know how to do that).
- Try putting '' around the message line, like this:
@Bone008
Thx alot man =P appreciated
2 last simple questions:
- Does players need to have the deathcontrol.use permissions written in their permissions (i'm usin pex) file?
- Tried many times but seems like the plugin config file doesnt support chinese, are there any way to connect the "message:" to the message file? cuz tht one does seem to support it
@Thenciouse
What I posted in my last reply was already a functional config with your parameters. I've created the whole config for you real quick: http://pastebin.com/Fg4hgNJj
It's somewhat the same, I just added the "damage-items 20%" action.
Yes, the plugin is backwards-compatible with 1.5.2 and even further. And the Configuration page and linked pages should be up to date. As long as you're not on the "Legacy" pages, everything should be fine.
@Bone008
thx for u time!
my server is a very complicated RPG server, which is still currently on 1.5.2 because i dunno how to make the horses part of the story line =///=.
so... is 2.0.0 compatible with MC 1.5.2? and... is your plugin guide updated? because i just.... really find it confusing some how... would it be possible for u to spend a little time writing a few lines that i can just copy&paste into my config file and work? I would be very thankful!
the codes only need to match these:
- works for everyone
- charge $198
- keep all items
- keep 75% of EXP
- damage 20% of all armor/weapons
(this should not take a lot of your time right? if it's too boring for u, i'm alright with it if u don't wanna do it... sorry for being so stupid =P)
@Thenciouse
You seem to be mixing up the old version of the plugin (v1.9) and the new one (v2.0.0). The config structure changed and now you have all that new stuff.
I admit it may be a bit more complicated, but it also allows more flexibility and a clearer design when setting up more complex systems.
Please make sure you have the new version v2.0.0 installed and then read through the new Configuration page (especially the "Handlings" section). Your setup would look like that, then:
This example would restore it automatically. If you want players to do the '
/dc back
' first, you can insert a '- wait command
' action at the beginning (first line of the 'actions:' block).>3< can anybody plzzz help... I need to finish my server tmr and this is the final aspect tht i need to include... searched everywhere for this TT^TT
It's such an awesome plugin but it's really confusion, eg, stuff like charge and cost, i dunno which one is in use now... @_@ Really wonder when smbody could come up with a youtube tutorial, i bet this plugin would then be used by alot more servers.
So, i'm trying to make the people in my server pay $198 for getting their full inventory and 75% of their exp back, i did this, but i really don't think it's correct:
DeathCauses:
VOID, LAVA, CACTUS, SUFFOCATION, FALL, SUICIDE, STARVATION, LIGHTNING, MAGIC, POISON, DROWNING, FIRE, EXPLOSION, MOB, PLAYER, UNKNOWN
keep-inventory: 1
keep-experience: 0.75
damage-items: 0.2
charge: 198
message: Having_your_inventory_back_will_take_$198