SavageDeathChest
Description:
This plugin stores a player's inventory in a chest on death for later retrieval. It has many options, but configuration and use has been kept as simple as possible.
Features:
- Places a single or double chest at player's death location containing the player's inventory
- Optional sign placement on chest, showing player name and death date
- Configurable list of block types that chests can replace
- WorldGuard, GriefPrevention, PreciousStones and Towny aware, will not place a chest where the player does not have access. Enabled individually.
- Option to check protection plugins on chest access. Enabled individually, disabled by default.
- added WorldGuard 7.0 compatibility.
- Searches a configurable distance from death location to find a suitable chest location
- Optionally require players to have chest(s) in inventory
- Chest protection allows only owners access. Also makes chests explosion proof!
- Optionally allow player's killer to access their chest, for pvp looting.
- Prevent concurrent access to chests when killer looting is enabled.
- Optional quick-loot feature allows one click (sneak-punch) chest looting
- Configurable expiration time for death chests, at which point they will break and drop their contents
- Custom messages and language localization
- Per world enabled in configuration
- Uses sqlite for persistent storage
- Prevents creative mode players from opening death chests
- Optionally prevent players from placing items in death chests
- Optional sound effects!
- A perfect compliment to SavageDeathCompass and SavageGraveyards
Permissions:
Permission | Description | Default |
---|---|---|
deathchest.player |
Default player permissions | true |
deathchest.chest |
Enable death chests for player. | true |
deathchest.loot |
Allows player to quick-loot death chests by sneak-punching. | true |
deathchest.doublechest |
Allows placement of double chests if necessary. | true |
deathchest.admin |
Default administrator permissions | op |
deathchest.freechest |
Overrides require-chest configuration setting. |
op |
deathchest.creative-access |
Overrides creative mode chest opening restriction. | op |
deathchest.loot.other |
Allow player to loot other player's chests. | op |
deathchest.reload |
Allows use of plugin reload command. | op |
deathchest.list |
Allows a user to view a list of their death chests and locations. | op |
deathchest.list.other |
Allows a user to view a list of other players death chests and locations. | op |
Commands:
/deathchest list [username]
Displays a list of player's death chest locations. Requires deathchest.list permission. If a player has permission deathchest.list.other, they can supply a username to list another player's deathchests, or type an asterisk (*) to list all deathchests.
/deathchest reload
Reloads configuration file and messages. Requires deathchest.reload permission, which is child node of deathchest.admin.
/deathchest status
Displays version info and some config settings. Requires deathchest.status permission, which is child node of deathchest.admin.
/deathchest help [command]
Displays a brief help message and command usage.
Installation
Put the jar in your plugins folder and restart your server. Edit the generated configuration file to your liking, then reload the plugin settings with the /deathchest reload
command. No server restart necessary!
Configuration
All configuration changes can be made without needing to restart your server. Just issue the reload command when you are satisfied with your settings in config.yml.
Source
Source code for this plugin is hosted on github and distributed under the GPLv3 license.
https://github.com/tim-savage/SavageDeathChest
@BruceFradgLee
Never understood why anyone use /back for player. Might just as well give them godmode, the difference is so small...
On my server anyone can break a deathchest, so he gets the cheast and its contends... Server is 1.7.9 ...
Here is a German translation of the Plugin! http://pastebin.com/ph92jp0X
@timsavage
Ah of course, I forgot the area was part of a worldguard so will be wordguard being the issue. Will get that sorted.
We use /back on our server and it works fine on most locations (Some issues in the nether due to the safe teleportation, but that's where helpful staff come into play) I may have a gander at the graveyard idea though!
@iTzDJ
The plugin does not have the ability to teleport players to their chests, and due to internal design limitations, it is not likely to be added until a version 2.0, which would include changes to how the death chests are stored and otherwise handled internally.
The original intention of the plugin was to require players to have to travel back to their death location to retrieve their inventory. On my own server, I disallowed the use of the /back command on player death, because I felt it was too easy and that there should be some penalty for dying. When my players complained that they often could not get back to their death location before their inventory items despawned, or were pilfered by mobs or other players, I created the death chest plugin to offer some protection to their dropped loot, with a configurable expiration time so that their items will be lost eventually if they do not retrieve them.
They also complained that it was too difficult to find their death chests, so I also created the SavageDeathCompass plugin, which gives players a compass on death that points to their last death location in a given world.
There were also complaints that the distance to travel back to their death location from the world spawn or their bed spawn location was too great. I definitely wanted to encourage exploration far from the world spawn, and so I initially used a graveyard plugin, and recently created my own, SavageDeathSpawn, with features I desired, including discoverability, so that graveyards need to be discovered by a player before they will be respawned at that location after death.
I think that the use of these three plugins together allows for a much more immersive, rpg style survival experience than just allowing players to simply type a command to retrieve their items after death. And since the /back on death command already exists, I don't really see much reason to duplicate the effort in this plugin, when the original goal was to remove the feature in the first place.
Is there a reason the /back command is insufficient for your purposes that it would require the same functionality to be duplicated by the DeathChest plugin itself? There are also dedicated plugins that implement teleporting back to a players death location, with various other features that you may find useful.
@BruceFradgLee
The DeathChest plugin does not differentiate between opped players and regular players when it checks for protection plugin permissions at a location. It simply asks each enabled protection plugin "does this player have build/access permission at this location?". If the protection plugin allows op to place or access chests where a normal player wouldn't, you will need to find a remedy within that particular protection plugin. If WorldGuard is the plugin you are having an issue with, make sure that the player is not a region owner or member, or otherwise remove build/access permissions as appropriate for that player in the region.
Here are a few suggestions for other work arounds:
Is there a way to make it so the override all for placement of the chests for OP players can be changed in config rather than yes by default? Using Ultimate arena so i've disabled the chests for regular players but OPs still drop chests.
I am unsure if this is already a feature in the plugin, but in a later update could you implement a command to teleport to your death chest (without having to do /back to get to your chest)? Thanks!
@Stygian_Inquirer
Ok, I think it should be possible to determine if a location is outside the world border when a chest is deployed. Although I would have left it where it was as a punishment for trying to circumvent the world border, but that's just me. lol
@TimSavage We had a situation where someone used an enderpearl to teleport outside the world border and could not retrieve their death chest. I was able to use WorldEdit to bring it back for them but I was wondering if it would be possible to check for a world border when placing a chest and make sure that the chest is inside it?
@SmallSansSerif
If you'd like to prevent the death chest owner from being able to access their own death chest in factions territory where they do not have normal chest access, uncomment the Factions line in the 'check-on-access' list in the config. Then, only the player's killer will be able to open the chest, assuming the killer does have chest access in that territory. (I guess you could also turn off the built-in chest protection, too. Then all players with chest access in the protected area would have access, but then chests in other areas would also be unprotected, except where covered by the external protection plugins.)
It's very confusing, which is why I'm inquiring about eliminating that feature, and just always overriding the protection plugins for chest access for chest owners (and killers, if that option is enabled). But if someone such as yourself finds the feature useful, than I'll likely keep it.
Edit: Also bear in mind that territory surrounding a chest could be claimed after the chest is deployed, further complicating the scenario.
@timsavage
So in the default setup if I'm using Factions and want to do what you suggested below what should be the proper config options. I already am using the killer looting feature.
"The only situation I can think of is if the killer looting feature is enabled, and a player dies in enemy territory. Then possibly allowing the killer access, but not the player would be warranted. Thoughts?"
I'm seeking input concerning the option that allows checking for build permission on chest deployment. (See poll above.) You can vote in the poll, comment here, or in the poll comments.
The feature is already implemented as an option, but I'm having trouble thinking of any possible situation where checking for build permission would be desirable, as opposed to checking for chest access permission in a protected region when a death chest is deployed.
If it is deemed to be unnecessary, I'd just as soon remove the functionality in order to simplify the configuration and underlying code.
Along the same lines, I'm also wondering if there are any situations where you would NOT want to override the protection plugins on chest access. I mean, once the decision has been made to allow the chest to be placed, what possible reason could there be to not allow the player to access it after the fact? The only situation I can think of is if the killer looting feature is enabled, and a player dies in enemy territory. Then possibly allowing the killer access, but not the player would be warranted. Thoughts?
Thanks in advance for your input!
Please note that if the check-on-place list in the config file is empty, you need to place a set of square brackets, like so:
This is due to the way yaml formatted code is handled. Without the square brackets, the yaml is technically invalid, and so it will pull this setting from the default config.yml embedded in the jar file, which of course has all plugins listed. So instead of no plugins being checked on chest placement, you will get all plugins being checked.
I meant to make a note of this in the comments, but forgot to add it before uploading.
A new version (beta3) has been uploaded that fixes several issues with checking permissions from external protection plugins. I believe all are now functioning correctly, as I was able to do more extensive testing over the weekend.
Btw, my nominee for best protection plugin API goes to PreciousStones. Thanks phaed420 for making things easy for me!
@timsavage
I'll help. I've tested it on PreciousStones, and so far that I know of, it works just fine. When a player dies inside of a protected area, a death chest is not placed.
Request for beta testers!
A new beta version has been uploaded that now supports the ignoring of supported protection plugins on chest deployment and chest access. The supported plugins are WorldGuard (v5 & v6), GriefPrevention, Towny, PreciousStones and Factions.
I have not fully tested all of these supported plugins. So if you are running Towny, PreciousStones or Factions, and would like to help me test and improve this plugin, download and try it out. Reports of it both working or not working with these plugins, in both the ignore and not-ignore modes, will be greatly appreciated. Please use pastebin for any console errors or stack traces.
Thanks in advance, your help is appreciated!
@Stygian_Inquirer
Try the new beta when it becomes available. It now checks supported protection plugins both when deploying a chest, and when a chest is accessed. Either check can be disabled for each plugin separately, which will then allow the placement/access, even if that would not have been allowed by the respective permission plugin.
I will consider adding the chest location command in a future version. In the meantime, you may consider the SavageDeathCompass plugin, which will give a player a compass on death that points to their last death location in that world.
@BruceFradgLee
I was having the same problem as Bruce but we had to have it ignore worldguard regions and in that case, it just spilled out the items instead of placing a chest. Looking forward to the update.
I had another question timsavage, would it be possible to put in a command that a player can use to be given the location/coords of their death chest?
@timsavage
Great, thank you very much :)