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
In the next version which will be out soon, it checks the enabled permissions plugins both during chest deployment, and also for chest access. If the checking is disabled for a plugin, it will be overridden, allowing a chest to be placed or accessed regardless of the region or plot permissions. The checks can be enabled/disabled for both placing a chest and for accessing a chest on a per plugin basis.
I expect to have a beta release out in the next day or two, and then a release version soon after.
When a player dies in claimed areas where they have no access, the chest drops but they cant get into it. I set it to ignore both worldguard and greifprevention yet players still cant access their chests when within. This could be a major problem for people losing items after the chest timeout. Is there a part in the config i missed or is bypassing access restrictions something you could add to the plugin?
A new version has been release that addresses the issue of hoppers being able to access death chest contents. That is the only change from the previous version.
@Stygian_Inquirer
That's definitely an oversight on my part. I did prevent the use of hoppers to insert items into a chest when I added the remove-only option, so I'm a little embarrassed that I didn't think of this exploit then. I'll push out a version to remedy this asap. Thanks for the report!
Hi timsavage, On behalf of Tulonsae, we have a report that while death chests can only be opened by the person who died, hoppers will pull items out of death chests. Is there a way to stop this? Thanks, Stygian_Inquirer on behalf of Tulonsae
@timsavage
Great! I look forward to direct Factions support but I'll pass on that tip to our users in the mean time. Thank you!
@SmallSansSerif
I will try to add specific support for factions in a future version. Currently, I believe that a player should be able to use the auto-loot (shift-click chest to transfer all contents to inventory) feature to recover their items from a chest that is deployed in an area that they normally wouldn't have chest access. I could be wrong about that though, I haven't tested that scenario.
Do you have a solution for integrating into a Factions server? So if a player dies in an enemy faction area can they get their items back?
@Tulonsae
The plugin listens for the PlayerDeathEvent, with priority of HIGH. It won't deploy a chest if a player's gamemode is creative, or if the dropped items list for the death event is empty, as well as checking for region permissions.
If another plugin clears the dropped items list on death, with a priority lower than HIGH, a chest would not be deployed. This is so other plugins can deal with the dropped items before the death chest is deployed, if their PlayerDeathEvent listener priority is NORMAL (default), LOW or LOWEST.
If a plugin is providing the /kill command, rather than using the built-in server command, it is possible it is not firing the PlayerDeathEvent. When testing the plugin, I use Essentials /suicide command, and that does cause a chest to be deployed, so I would expect at least Essentials provided /kill command to behave similarly, but another /kill plugin may not.
Perhaps in a future release I will allow for more detailed logging of chest deployment/non-deployment, in order to make it easier to detect issues, including players trying to grift admins for equipment.
I have a report that a death chest is not created if the player dies via the /kill command. Falling to their death created a chest so the region wasn't an issue.
I haven't looked at the source, but was wondering if there's something about the type of death that the plugin checks.
@NinjaSplat
Ok, that's exactly what I was thinking. I will simply test for canPlace in PreciousStones areas when a chest is deployed. This plugin has its own built-in protection so only owners can access or destroy death chests (or their killers, if that option is enabled), and I believe that they can still auto-loot the chests even in areas that would otherwise deny them container access or block breaking.
@timsavage
PreciousStones has flags such as: protect-inventories which prevents players from opening containers, and has a prevent-destroy and prevent-place flag. If I were you, I'd at least check for the prevent-place flag. Since flags can be toggled with PreciousStones, at least check to see if it can be placed.
@NinjaSplat
Yes, I just had a look at the PreciousStones API, and it looks like it should be no problem to add support for that.
Since I've never used PreciousStones, is there a particular flag I should check for to test if a death chest should be placed, or should I just use the canPlace() API method provided?
Hey, can you add a hook for PreciousStones that checks for build and chest permissions? Thanks! :)
@erdrickk
It should allow death chests in WorldGuard regions if the option 'worldguard-enabled' is false. If it doesn't, then there is a bug.
I just ran a quick test, and it seems to be working as intended on my server with WorldGuard 6. Can you tell me which version of WorldGuard you are using?
Also, did you issue a /deathchest reload command or restart your server after changing the setting in the configuration file?
How do you allow death chest to be dropped in WG regions? I've tried that setting in the config as both true and false and neither works. DeathTPPlus has a WG bypass feature. Can you add this?
A couple of minor bugs fixes and a missing configuration setting prompted a 1.4.1 release.
A new version (v1.4) of SavageDeathChest has been uploaded and is
awaiting approvalavailable for download. There are many bug fixes and a few additional features. Special thanks to madtomic for help in beta testing / bug hunting!@HubToo
I think you said you have Multiverse installed? So from your console, or in game if you have the requred Multiverse permissions, you can list the worlds that Multiverse is aware of with the /mvlist command. Then, to get the info for each individual world, use
/mv info <worldname>
At the very top of the output, just below the General Info heading, it will say
World Name: <worldname>
World Alias: <worldalias>
and a whole bunch of other stuff about the world. That World Name should be the actual name that craftbukkit uses, and the World Alias, if set, is an alias given by Multiverse. You will want to use the World Name as shown for each world you want in the enabled worlds list.
I'm going to do a final bit of testing on the new version of the death chest plugin, and then upload it today. Then, you can use that new version to only list disabled worlds, if any, and death chests will be enabled for all other worlds on your server, without explicitly naming them in the config.
@timsavage
Thank you Tim!
In craftbukkit i have things like:
So i would use world_lotrutumno? Or lotrutumno?
Also, at least in this case, these are not the actual directory names that contain the worlds (DIM100 and DIM101 are).
And they are not in the same directory as my server jar, but all under the world directory (world/DIM100 and world/DIM101).
Sorry, i'm still a bit confused!