[INACTIVE][MECH] DeathChest v1.33b - Protect your drops! [80]

Discussion in 'Inactive/Unsupported Plugins' started by recanu, Feb 11, 2011.

  1. Offline

    recanu

    DeathChest v1.33b (Build 480)

    When you die and there is a chest in your inventory, it will be placed where you die or in a free spot (searching upwards). The chest will be filled with as many items as possible and any item that does not fit in the chest will be dropped. If you got two chests in your inventory and the items in your inventory do not fit in a single chest, a double chest containing all your items will be created.
    If you've got a sign in your inventory, a memorial sign will be created above your chest containing the Sign Template (see below). If you rightclick this sign as owner of the chest, all items (leaving those which do not fit in the chest) will be transferred to your inventory.

    Features:
    • Stores all your item drops in chests when dying if you have got a chest in your inventory
    • Creates a sign with configurable content! (/plugins/DeathChest/signTemplate.tmplt, see "Sign Templates" for further information)
    • Chest expiration! Chests are removed after a certain set of time which is also configurable in the config.yml!
    • When using the Permissions plugin, only users with the permission 'DeathChest.use' can drop DeathChest when dying. If not using it, everyone will drop chests.
    • Adds the Permission 'DeathChest.freeChest' to a group or player will remove the requirement to have a chest in their inventory. This way they will always drop a chest when dying. (They still need to have the 'DeathChest.use' Permission!)
    • Adds the Permission 'DeathChest.freeSign' to a group or player will remove the requirement to have a sign in their inventory to place a memorial sign above their chest.
    • LWC Support: protect chests & signs with LWC if this is enabled in the configuration
    • Local Permissions for non-Permissions users! Easy configuration of permissions with a permissions.yml file!
    • Sign quick loot: click the sign of your chest to loot your chest.

    Configuration
    Code:
    # This is the configuration file of DeathChest
    # Lines with # are comments and are ignored
    # placeSigns: true if signs shall be placed, false if not
    # protectChests: true if LWC shall be used to protect chests
    # protectSigns: true if LWC shall be used to protect signs
    # expiration: Time (in minutes) when chests shall disappear with all items. 0 = never.
    # dropItemsOnExpiration: true if items shall be dropped when deleting an expire chest.
    # removeUponQuickLoot: true if chest and signs shall be removed when quicklooting
    # removeChestIfAvailable: true if chests shall be removed from the inventory of a user with the
    #                         freeChest permission if they have got one in their inventory
    # removeSignIfAvailable: the same as removeChestIfAvailable for Signs
    # permissionSystem: Sets the permission system that should be used: LOCAL, PERMISSIONS, GROUPMANAGER or detect
    death:
        placeSigns: true
        protectChests: false
        protectSigns: false
    chests:
        expiration: 0
        dropItemsOnExpiration: true
        removeUponQuickLoot: false
    permissions:
        removeChestIfAvailable: false
        removeSignIfAvailable: false
        permissionSystem: detect
    This is the default configuration (located in /plugins/DeathChest/config.yml).

    The configuration is created when first time running the plugin.
    Editing the configuration is either done with an editor (like notepad) or with the in-game configuration editing. This requires Op rights when using a player or can be done through the console: just type in /dc config <node that you want to edit, ex: expiration> <a valid value: ex 0>
    Note that configuration files from older versions may be incompatible with newer versions and that you have to either delete and generate a new one or to edit the nodes.

    Sign Templates
    Code:
    Line 1: +name+
    Line 2: +date+ +time+
    Line 3: +cause+
    Line 4: R.I.P.
    Date Format: MM-dd
    Time Format: HH:mm:ss
    This is the default Sign Template (located in /plugins/DeathChest/signTemplate.tmptl).
    At the moment there are 4 variables: +name+, +date+, +time+ and +cause+.
    +cause+ contains these strings:
    TNT, Cactus, Drowning, Zombie, Skeleton, Creeper, Spider, Ghast, Giant, Pig Zombie, Slime, the player name of the player who killed you, Falling, Fire, Lava, Suffocation and Suicide (when doing /kill).
    Date Format and Time Format define how time (or date) are formatted. Ex: MM-dd will give "08-15" (15th of August). The text will be shown on the signs above the chests.

    Permissions:
    This plugin is compatible with Permissions 2.51 (All versions except 2.0 and below should work), GroupManager (0.99d+) and it's own local permissions system.
    These Permission Nodes are used with Permissions 2.51 and GroupManager:
    • 'DeathChest.use' - allows people to use DeathChest
    • 'DeathChest.freeChest' - deletes the requirement to have a chest (or two) in their inventory. (People with this Permission still need 'DeathChest.use' to use DeathChest.
    • 'DeathChest.freeSign' - same as freeChest for signs.
    • 'DeathChest.allowQuickLoot' - allows quicklooting when rightclicking the sign
    • 'DeathChest.protect' - Protects all chests and signs of this users (if enabled in the configuration and if LWC is installed) with LWC
    Note that when NOT having the Permission or GroupManager plugin, the local Permissions System (only avaible after v1.31b) will be used. It will be located in /plugins/DeathChest/permissions.yml. Read through the file and your questions will be answered.
    You can also switch the permission systems through the configuration node 'permissionSystem'. (See Configuration)

    Commands
    • /dchest info|version - shows info about your DeathChest version
    • /dchest config - shows the current configuration
    • /dchest config <node> <value> - edits the configuration and changes the value of <node> to <value>
    • /dchest reload - reloads configuration and sign template.
    All Commands require Op rights.

    Download DeathChest(v1.33b)

    Changelog:
    After releases with a configuration file changes, I suggest to delete (or rename) your old configuration and let the plugin generate a new one. This way it's more save for you to edit the file.


    Version 1.33b
    • Bugfixes
    • Code optimization
    • Permissions 2.51 and GroupManager are now both compatible.
    • You can choose your permission system in the configuration.
    • Fixed the permission node 'DeathChest.protect'; this is required for those users whos chests&signs should be protected
    *I maybe forgot some points here

    Version 1.32b
    • Updated to newer bukkit builds (tested with 438)
    • Changed commands: from /dc to /dchest.
    • Added new commands: /dchest info|version: Shows info about the DeathChest version, /dchest config: Shows the current configuration.
    Version 1.31b (300-347) (348+)
    • Fixed a second bug that caused errors when not using LWC
    • Added local permissions system located in /plugins/DeathChest/permissions.yml
    • Fixed for CraftBukkit build 348+
    Version 1.3b
    • Fixed a bug that caused errors when not using LWC
    • Added a new configuration node: chests.removeUponQuickLoot. See "Configuration" for further information
    • Added a command: /dc reload; This requires Op rights in-game. It reloads the configuration and sign template without clearing the DeathChest list (which happens when doing a server reload)
    • Added a new Sign Template variable: +cause+; See "Sign Templates" for further information.
    • Didn't add configurable sign position: postponed to v1.4.
    Version 1.21b (Note, this is a beta release and MAY contain bugs)
    • Fixed a bug that caused errors when placing single chests.
    • Added and modified configuration nodes. Notice that when updating from older versions that some nodes became inactive and were replaced by new ones. See "Configuraiton" for further information
    Added sign protection
    • Added Permission node 'DeathChest.allowQuickLoot'
    Version 1.2b (Note, this is a beta release and MAY contain bugs)
    • Added LWC support (new configuration node: useLWCProtection)
    • Added configurable Sign Template (/plugins/DeathChest/signTemplate.tmplt) See "Sign Templates" for more information.
    • Added quickloot sign: owners of DeathChest can click the sign above the chest to completely (or partially if the inventory can not hold all items) loot the chest
    • Added sign-consuming (now needs a sign in the inventory to place a sign above the chest)
    • Added new permission node: DeathChest.freeSign
    • Fixed Bugs: Chests now pick up armor and do not destroy blocks (if not necessary because of space problems) when being placed.
    Version 1.1
    • Added expiration timer.
    • Added configuration file.
    • Added Permissions suppport.
    • Added warnings when people destroy your DeathChest.
    • Added warnings before your DeathChest expires.
    Version 1.0
    • First public release.
    Bugs
    • The WorldGuard /slay command does not trigger a DeathChest - This seems to be caused by WorldGuard.
    If you experience bugs, please submit what doesn't happen right, the version of DeathChest you are using, which craftbukkit build #, the configuration file and the error stacktrace (if there is one).

    TODO
    • Add configuration for the Sign Position - in progress for v1.4
    TODO nodes marked as 'Done' are already coded and will be added in future releases.

    Info:
    The plugin was tested with craftbukkit build 300+. It may work with older versions, but this can lead to errors or other unwanted results. Also beta releases (marked with vx.xb) may contain bugs and lead to errors (or worse things).

    I'm open for suggestions!
     
  2. Offline

    Biebboek

    Awesome, thanks :)! Working now.
     
  3. Offline

    Kayonesoft

    I don't know if this is Worldguard or Deathchest but I'm going to report it to you both.

    Using Deathchest, whenever someone dies it spawns a chest containing all their inventory items at their location.
    And it works with Worldguard, but using the WG /slay command, it doesn't spawn a chest and no items fall to the ground so they're all lost.
     
  4. Offline

    jwideman

    Well, WG is generating an event that DeathChest doesn't catch, so I'd say it's a bit of both.
     
  5. Offline

    psprofi

    Hello, i have a problem.
    if i died a chest is created but its nothing in there.

    And if i place the removed chest, i cant destroy it anymore. I spawn again
     
  6. Offline

    recanu

    Looking into this.
    EDIT: Seems to be caused by WorldGuard. The slay command just sets the health to 0 and does not call an EntityDeath event.

    Which craftbukkit build and which version of DeathChest are you using? Do you get any error messages in the console?
     
  7. Offline

    psprofi

    Hello, sorry i forget the infos
    DeathChest 1.32b
    BukketBuild 438/440
    No Error
     
  8. Offline

    Kayonesoft

    It looks like this doesn't work with Multiverse plugin either.
    When teleporting over to the new world, when I die it doesn't spawn a chest (just drops your inventory)
    When back in the default world it works.
     
  9. Offline

    recanu

    That's strange. I tried it with craftbukkit #450, MultiVerse1.4 and Permissions 2.1 and it worked like a charm. Maybe you didn't update Permissions to 2.1, it adds multiple world support.
     
  10. Offline

    Soul Reaper

    could you make a version that will store everything someone with a backpack drops?
     
  11. Offline

    Kevin Forte

    Hello, I have been sent by my cmd prompt to ask you to post the update source for your plugin here. (Links to the CraftBukkitUpToDate plugin forum, apparently the dev implemented plugin updating)
     
  12. Offline

    recanu

    That's kinda difficult to implement, because all those inventory pages can contain a lot more items than a chest could hold. The only way to do this would be some kind of virtual chest (maybe shown as a sign), but then looting would only be possible through quicklooting. Anyways, I will add this to the TODO list.

    Done :)

    By the way, expect a 1.33b update soon but it will not contain any big new features. Progress so far:
    • Fixes the permission node 'DeathChest.protect' - this is required to limit LWC protection to some users.
    • Adds In-game configuration editing.
    • Faster implemention of expiration, meaning less lag for big servers.
    • Cleaned up a lot of code and optimized this and that.
    I will also not be able to fix the problem with WorldGuard's /slay command, because it seems to be caused by WorldGuard.
     
  13. Offline

    Soul Reaper

    I was thinking of multiple chests spawning as a quickfix
     
  14. Offline

    recanu

    You really think spawning up to 9 chest is a good idea? :p
     
  15. Offline

    Kayonesoft

    That might be it. I'm using GroupManager.
    It's a bit confusing right now since it seems like a bunch of plugin authors are split between Permissions 2.1 and GroupManager.
     
  16. Offline

    recanu

    Yea, I am split between those two, but I will keep using Permissions for now. It seems like the plugin author of GroupManager will add MultiWorld aswell and as soon as that is ready, I will add GroupManager support. I will leave the decision to you what you want to use (probably through a configuration file node, letting you decide to take Permissions, GroupManager or the local permissions).
     
  17. Offline

    Soul Reaper

    Well, its that or lose whatever in them. Though if someone was stupid enough to keep digging with 9 inventories full of goodies and not store them, I guess they deserve to lose it >.<

    I wholeheartedly approve of GM, except for the clunky format it uses compared to permissions
     
  18. Offline

    Phaedrus

    I prefer permissions 2.1 personally. Multiworld support is a pretty big deal on my server. And I can't stand the oddities of the GM config mangling.
     
  19. Offline

    Afforess

    Just an FYI, backpack does things correctly, and removes the items from the inventory pages, and updates the EntityDeathEvent's loot list to contain all the items. So you just need to be able handle cases where the getDrops List is greater than 2 chests.
     
  20. Offline

    Volander

    I keep getting this wierd error:
    Code:
    2011-02-27 19:33:18 [SEVERE] java.lang.NullPointerException
    2011-02-27 19:33:18 [SEVERE]    at com.recanu.DeathChest.DeathChest.Update(Death
    Chest.java:384)
    2011-02-27 19:33:18 [SEVERE]    at com.recanu.DeathChest.DeathChest$1.run(DeathC
    hest.java:146)
    2011-02-27 19:33:18 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.
    run(CraftWorker.java:33)
    2011-02-27 19:33:18 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    Craftbucket verion: 440
    DeathChest version: v1-32b

    - Volander
     
  21. Offline

    D2S4L1T2

    Using a server hosted by "Servercraft.co", every time I've tried to upload DeathChest, the mcMyAdmin system they use for access to the server's controls becomes bugged and stops working. They tell me it's something to do with ports being changed.

    Now, I feel pretty sure that this plugin should have nothing to do with that, but I don't get the issue with any other plugin. I'm also not using anything else similar to it, so I am perplexed and sad. I really want to add this into my server's list!

    I'm hoping someone reading the thread will have encountered the problem in the past, or have a suggestion on what might actually be the cause. *crossfingers*
     
  22. Offline

    Afforess

    that happens when a player teleports, I'm guessing.
     
  23. Offline

    Grimmkrieg

    I've recently installed this, and it seems to respond to /gchest commands (and created the DeathChest folder and config files,) but I don't get any indication that it's loading/initialized on server boot (not sure if I even should be.)

    Regardless, the plugin isn't working for me. I've been killed by spiders, zombies, creepers, /kill, falling damage and my gear constantly pops out onto the ground. I've had myself (an OP) and one of my players test it as well. Both with chest/signs in inventory and without.

    I'm running DeathChest 1.32b, and CB 440 as found here: http://ci.bukkit.org/job/dev-CraftBukkit/Recommended/ and Permissions 2.4 - I imagine that the new Permissions 2.4 is the issue - is it possible to override DeathChest's use of the actual Permissions plugin and use the built-in system instead?

    Thanks!
     
  24. Offline

    Jdbye

    Doesn't seem to work with GroupManager+FakePermissions.
    I get this when someone dies:
    Code:
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at com.recanu.DeathChest.DCEntityListener.onEntityDeath(DCEntityListener.java:92)
            at org.bukkit.plugin.java.JavaPluginLoader$40.execute(JavaPluginLoader.java:334)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:111)
            at net.minecraft.server.EntityLiving.a(EntityLiving.java:392)
            at net.minecraft.server.EntityHuman.a(EntityHuman.java:376)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:137)
            at net.minecraft.server.Entity.a(Entity.java:612)
            at net.minecraft.server.Entity.c(Entity.java:546)
            at net.minecraft.server.EntityLiving.b(EntityLiving.java:561)
            at net.minecraft.server.EntityLiving.q(EntityLiving.java:667)
            at net.minecraft.server.EntityHuman.q(EntityHuman.java:160)
            at net.minecraft.server.EntityPlayer.q(EntityPlayer.java:189)
            at net.minecraft.server.EntityLiving.f_(EntityLiving.java:230)
            at net.minecraft.server.EntityHuman.f_(EntityHuman.java:82)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:146)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:209)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:349)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:264)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    I use com.nijiko.permissions.PermissionHandler with FakePermissions in my own plugin though, and it works fine there.
     
  25. Offline

    recanu

    1.33b will be released tomorrow and it will fix those errors.
     
  26. Offline

    Grimmkrieg

    Cheers! Thanks for all your work on the plugin and the quick response!
     
  27. Offline

    kl0wn

    When people die there isn't a sign being created. I am bukkit 458 without permissions and no other addons. When you do run to where you die everything is invisible but you do still pick everything up. I see no errors in the console.

    Any hints?
     
  28. Offline

    Jdbye

    Did they have a chest/sign in their inventory when they died?
     
  29. Offline

    recanu

    Released version 1.33b. This makes some changes with the permission system (adding Permissions 2.51 and GroupManager and allowing you to choose which system you would like to use in the configuration file). It also fixes some bugs with expiration and such.

    @Volander This is fixed in 1.33b
    @Grimmkrieg There should always be a [DeathChest] version [1.32b] loaded when booting the server.
    @Jdbye This is also fixed in 1.33b
     
  30. Offline

    Volander

    Thank you. thank you - very much :)
     
  31. Offline

    Jdbye

    Can you add color support to the signs? Would be neat to have.
     

Share This Page