DeathChests
DeathChests
This plugin is similar to the Death-System of Diablo 2 (and many other RPG games). If you die it will put down a chest at your feet and your whole inventory gets stored in this chest. But this only works if you have enough chests in your inventory (or if you have certain permissions).
This chest is also saved against every player-based attack. So nobody could loot you while you're walking back to your death point. And also the chest doesn't despawn after time.
Features:
- Drop a chest upon death if you have one in your inventory and save your inventory from being destroyed
- Your chest gets signed with your name if there is space for a sign (either on the side or on the top)
- Shift (Sneak) + click the DeathChest to easily reeqiup your inventory
- Protect your items from griefers and other hazards. Nobody can steal your stuff while you're dead.
- Chest gets unlocked after a defineable time (prevent with per player permissions)
- After unlocking the chest you can define a time after this the chest automaticaly gets destroyed (spills content on ground)
Usage:
Just give yourself the permission deathchest.use and carry a chest around to save your items upon death.
Permissions:
| Permission Node | Default | Description |
|---|---|---|
| deathchest.admin | op | Allows access to the /deathchest command |
| deathchest.breakothers | false | Allows to loot or break the DeathChest of others |
| deathchest.use | true | Allows the usage of DeathChests |
| deathchest.use.free | false | You don't need to carry chests with you to use this plugin |
| deathchest.use.sign | true | Puts a name-sign on your DeathChest if possible |
| deathchest.use.pvp | true | If this is set, players will also drop a DeathChest if they are killed by a player |
| deathchest.use.xp | true | If this permission is set, the XP will also be saved (if set in config) |
| deathchest.use.noTimeout | op | Removes the Timeout-feature for a specific permission-group if set |
| deathchest.compass | true | Allows the usage of the /dc compass command |
Commands:
For every command you need the deathchest.admin permision-node! The main command is "/deathchest", but you can also use "/dc". In the table below there are only the first arguments listed, that defines the command. /deathchest <subcommand> [argument1, ...]
| Subcommand | Aliases | Arguments | Description |
|---|---|---|---|
| reload | Reloads the configuration of the plugin | ||
| info | version | Show information about the plugin version | |
| clear | [playername] | Clears the DeathChest-Dictionary (removes protection and Sneak+Click-Support) If there is a playername provided it only removes the chests of this player | |
| compass | Points your compass to one (the first not picked up) of your DeathChests |
Configuration:
This describes the content of the config.yml:
| YML-Node | Default | Description |
|---|---|---|
| general.autosavePeriod | 900 | This defines the period (in seconds) when the DeathChest-Dictionary gets autosaved |
| general.timeout | 900 | The timeout period in seconds. After this period, the chest is accessable to everyone |
| general.pickupEmpty | false | If set to true, DeathChests will be picked up as soon as they are emptied (after a defineable Timeout) |
| general.emptyTimeout | 5 | Time in seconds. After this duration the chests will be automatically put into the players inventory |
| general.saveXP | true | This must be set or the save-Xp-function won't work |
| general.saveXPRation | 0.75 | Percentage of the experience level that will be kept upon death |
| general.fullVanish | 3600 | Time in seconds. After this amount of time AFTER the lock timeout the chest gets destroyed (0 disables this feature) |
Additional Information:
Please tell me any bugs you find and every feature you miss!
Planed feature:
- Define how many gold you loose upon death
- Addition: Gold needed for a deathchest
Also save your XP-Points inside the chest (Release them at picking up the chest)Command to let your compass point to your chest
Frequently reported errors:
If you get an error like:
java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor version 51.0
Update your Java to 1.7 your are using 1.6 or lower!
-
View User Profile
-
Send Message
Posted Aug 15, 2012[SEVERE] Could not pass event PlayerInteractEvent to DeathChests org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:332) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:177) at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:331) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:649) at net.minecraft.server.Packet15Place.handle(SourceFile:58) at net.minecraft.server.NetworkManager.b(NetworkManager.java:281) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:583) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: java.lang.NullPointerException at com.Belkar.DeathChests.DeathChests.getDeathChestAt(DeathChests.java:477) at com.Belkar.DeathChests.DeathChestEventListener.onBlockInteract(DeathChestEventListener.java:159) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330) ... 16 more
-
View User Profile
-
Send Message
Posted Aug 14, 2012Does this work on 1.3.1?
-
View User Profile
-
Send Message
Posted Aug 14, 2012@Dustinduse Well I took a look at the bug you descriped but I wasn't able to replicate it. The permission-node 'deathchest.breakothers' is as of the default setting negated. There shouldn't be any possibility your clients are able to open each others deathchests... Maybe you can provide more detailed information (what plugins do you use, permission file)
-
View User Profile
-
Send Message
Posted Aug 14, 2012@Ens2010 Ok I will add an option (or permission) to deactivate PvP deathchests. I probably don't think that it will confilct with lockette but I'm not sure. I think setting a block via code doesn't trigger SignPlaced (or whatever the event is called).
@Dustinduse Hmm.... I will take a look at this bug.
@LiLChris06 Ok will be made. Timestamp upon chest-creation. If timestamp is too old, everyone can open the chest (doesn't effect other features like: Auto-Pickup)
EDIT: Well, well, I just uploaded an updated version (1.1c) with the implementation of those featurerequests
I changed the savefile-format for more flexibility, so you will loose ALL your deathchests (the protection, not the chests themselves)
-
View User Profile
-
Send Message
Posted Aug 13, 2012I second lilchris06's idea!
I have 1.1b and i gave players free chest and sign perm and negated the breakothers but players can still open each others chests
-
View User Profile
-
Send Message
Posted Aug 13, 2012Maybe an option to be able to toggle whether it activates when killed by a player? I have a pvp server, so while this would be good for other deaths due to mobs and other circumstances, I cant use it because it would take alot of the purpose out of pvp. Also, would the sign on the chest conflict with plugins like lockette which use signs on chests as a locking mechanism?
-
View User Profile
-
Send Message
Posted Aug 13, 2012Looks interesting!
Suggestion if possible: Adding a timer before the chest gets unlocked to all players. Maybe even keep the name of the player on the sign so who ever gets the contents can see who it was from.
-
View User Profile
-
Send Message
Posted Aug 13, 2012@lanman14444
I just updated the plugin to version 1.1. It's currently under approval so it may take some time. Thanks for telling me this bug. I forgot to test the free-chest feature :D. Sorry that you completely lost your whole inventory. This won't happen anymore since now the inventory gets dropped as soon as any error occours.
-
View User Profile
-
Send Message
Posted Aug 12, 2012I am getting a error on death at
2012-08-12 16:55:08 [SEVERE] Could not pass event PlayerDeathEvent to DeathChests
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:332)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:322)
at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:307)
at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:663)
at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:595)
at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:349)
at net.minecraft.server.EntityLiving.a(EntityLiving.java:845)
at net.minecraft.server.EntityHuman.a(EntityHuman.java:1145)
at net.minecraft.server.Entity.a(Entity.java:736)
at net.minecraft.server.EntityPlayer.b(EntityPlayer.java:465)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:422)
at net.minecraft.serverhook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:70)
at net.minecraft.server.Packet10Flying.handle(SourceFile:136)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:281)
at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
at net.minecraft.server.ServerConnection.b(SourceFile:35)
at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:579)
at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:472)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:404)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Caused by: java.lang.IndexOutOfBoundsException
at com.Belkar.DeathChest.DeathChest.addChest(DeathChest.java:173)
at com.Belkar.DeathChest.DeathChestEventListener.onPlayerDeath(DeathChestEventListener.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
... 24 more