Inactive [SEC/MISC] Cenotaph 2.1.2 - A Dead Man's Chest plugin [1.2.5-R1.0/2149]

Discussion in 'Inactive/Unsupported Plugins' started by Southpaw018, Jun 5, 2011.

  1. Offline


    Cenotaph - A Dead Man's Chest plugin
    Version: 2.1.2

    Plugin Dependencies
    Lockette (Optional) OR LWC (Optional)

    Cenotaph is a fork of the most excellent Tombstone by Drakia. As he has stopped development, I decided to take it up and add some features I wanted (and that some users on the forums have requested).

    Download, Source, and Bug Reports/Feature Suggestions

    What's a Cenotaph?
    A Cenotaph is a monument to a dead person who is either buried elsewhere or whose body is not available for burial. If you think about it, it exactly fits the situation - there's no body, since you've respawned ;)

    When your players die, depending on how you have things set up, their items will be placed in a Dead Man's Chest for safekeeping. You can require that your players carry around chests and signs of their own at all times, or simply have the chests appear on death. You can also secure the chests with LWC3 or Lockette.

    More specifically:
    Show Spoiler

    • If the player is carrying a chest when they die, place that chest and fill it with as much of their inventory as possible
    • If the player is allowed, and is carrying two chests, a large chest will spawn to catch all of their inventory
    • Possible for specific groups/players to be given free chests with no need to carry one with them
    • Any items that won't fit in the chest will still drop to the ground!
    • Supports the Permissions plugin, will default to allowing everyone to use basic cenotaph if not available
    • Supports LWC for chest AND sign protection if it is installed
    • Supports Lockette for chest protection if it is installed
    • Configurable timeout for LWC unprotection
    • Configurable timeout for destruction of cenotaphs, works in unloaded chunks as well
    • Quickloot support, right click the sign on a cenotaph to loot all items in it (your chest only!)
    • Place a sign on top of the chest stating the players name and time of death
    • The ability to point your compass at your cenotaph
    • Customizable sign messages on the cenotaph
    • Admin commands for management

    Coming Soon

    See what's coming soon, report bugs, and add your own requests on the Github project!
    1.3: Initial public release, Lockette support
    1.4: General features and bug fixes, round 1
    1.5: Plugin organization
    1.6: Additional features
    2.0: Brought back from the dead after 5 months of inactivity, updated for Release
    2.1: Highly requested features
    2.2: Major cleanup, Towny integration
    2.3: Economy integration
    2.4: More feature requests

    See the default config file on Github for annotations and explanations.

    Config notes
    • If you are going to be giving your players a free chest/sign, but don't want them to be able to retrieve those as extra items, set the noDestroy option in the Cenotaph config file.
    • If you do set the noDestroy option, it is highly recommended that you set a timeout for Cenotaph removal, because even once LWC is disabled the chest is still not destroyable by any means other than quicklooting it or an admin with permissions breaking it.
    • With noDestroy enabled, if a player dies without a sign, then their chest will be indestructible until it is removed by Cenotaph itself.
    • It is not recommended to use the noDestroy option without the destroyQuickLoot option

    Show Spoiler
    cenotaph.use - Allow the player/group to use the cenotaph plugin
    cenotaph.freechest - Allow the player to get a chest whether they are carrying a chest or not
    cenotaph.large - Allow the player to spawn a large chest if carrying two chests and if one will fit
    cenotaph.lwc - Protect the placed chest if LWC is enabled
    cenotaph.lockette - Protect the placed chest if Lockette is enabled
    cenotaph.sign - Whether the player gets a sign on their cenotaph chest
    cenotaph.freesign - Allow the player to get a free sign whether they are carrying one or not.
    cenotaph.freelockettesign - Give the player an additional free sign for Lockette
    cenotaph.quickloot - Whether to allow a player/group to quickloot by right clicking the cenotaph sign.
    cenotaph.cmd.cenotaphlist - Allow this user to use /cenlist
    cenotaph.cmd.cenotaphfind - Allow this user to use /cenfind
    cenotaph.cmd.cenotaphtime - Allow this user to use /centime
    cenotaph.cmd.cenotaphreset - Allow this user to use /cenreset

    cenotaph.admin - Allow this user to physically destroy others' cenotaphs. Also a prerequisite for use of the other admin commands
    cenotaph.admin.list - Allow this user to see all cenotaphs
    cenotaph.admin.find - Allow this user to find any cenotaph
    cenotaph.admin.time - Allow this user to check the time left on any cenotaph
    cenotaph.admin.remove - Allow this user to destroy any cenotaph

    @Drakia: Cenotaph was originally Tombstone, by Drakia (TheDgtl). Many thanks to him for his hard work on the original plugin.
    @Acru: Thanks to Acru, the developer of Lockette, as well. His help getting the Lockette integration working as I stumbled by way though picking up Java was invaluable. :)

    Show Spoiler

    /cenlist - List all your cenotaphs
    /cenfind <index> - Gives you a direction from your current location to your cenotaph and sets your compass to point at it
    /centime <index> - Tells you how much time is left before the specified cenotaph has its protection remove or it breaks
    /cenreset - Reset compass to point to spawn

    /cenadmin list - List all players who have cenotaphs spawned
    /cenadmin list <playerCaseSensitive> - List all cenotaphs belonging to <player>
    /cenadmin find <playerCaseSensitive> <index> - Show details on <player>'s cenotaph <index>
    /cenadmin remove <playerCaseSensitive> <index> - Destroys <player>'s cenotaph <index> and drops its contents on the ground
    /cenadmin time <playerCaseSensitive> <index>
    /cenadmin version - Show current version of Cenotaph and check for a new version

    Version 2.1.2
    *Optimized break override options (keepUntilEmpty and breakWhenEmpty)
    *Add death messages for beta 1.8 monsters (Finally...yikes. Sorry, everyone.)
    *Work around an error caused by missing or invalid deathMessage entries (Thanks, ffkhrocks)
    Version 2.1.1
    *Fix issue loading .db save files from pre-2.1 versions (Thanks, Inscrutable)
    Version 2.1
    *Added option for level-based time removal
    *Added requirement for Lockette sign to be carried in inventory (free sign permission available)
    *Added option to disable in specific worlds by name
    Show Spoiler

    Version 2.0
    *Updated listeners to new Bukkit API
    *Updated config to new Bukkit API
    *Removed support for Nijikokun's old Permissions plugin
    *Updated to latest LWC API
    *Added cenadmin reload command
    Version 1.6.6
    *Fixed NullPointerException when using defaults for deathMessages instead of the values in the config file
    *Added config check to /cenadmin version
    *Fixed bug with break messages always displaying at original timeout when quicklooted
    Version 1.6.5
    *Fixed a few additional bugs
    *Fixed conflict with Spout under CB1060
    Version 1.6.4
    *Add Bukkit Superperms
    *Remove deprecated Bukkit method getFace()
    *Merging some of Drakia's recent Tombstone fixes
    -Fix clearing of player's cenotaph list on quickloot
    -Fix LWC API error
    Version 1.6.3
    *Customizable death messages for signs
    *Customizable time and date formats for signs
    Version 1.6.2
    *Option to remove cenotaphs once they are empty, regardless of other settings
    *Option to keep cenotaphs UNTIL they are empty, regardless of other settings
    *Fixed bug allowing players to break into Lockette-protected cenotaphs
    Version 1.6.1
    *Security options now apply to both Lockette and LWC (requires config.yml update)
    *New command: /centime, /cenadmin time
    Version 1.6.0
    *Updated for Craftbukkit RB1000
    *Fixed customizable signs
    *Added admin commands
    Version 1.5.4
    *Customizable signs (Thanks to @Drakia for his death cause code)
    Version 1.5.3
    *Re-enable compass integration (Thanks, @Zarius!)
    *Build against Craftbukkit RB953
    *Build against LWC 3.3
    *Build against Permissions 3
    Version 1.5.2
    *Fix bug causing Cenotaph to throw an error on enable if the folder containing config.yml did not exist
    *Fix bug where the Void check was only working if the player died in the Void above the world and not below
    Version 1.5.1
    *Fix bug allowing a free sign if Lockette sign was broken off a chest
    Version 1.5.0
    *Fix config file handling - no more needless file overwrites
    *Gracefully handle missing or invalid config files by downloading a fresh commented copy
    *Create config file versioning system to avoid errors with updates
    Version 1.4.4
    *Added config version check
    *Final 1.4 release
    Version 1.4.3
    *Basic protection against creeper explosions, disabled by default
    Version 1.4.2
    *Option to disable the void check for servers that have other plugins to handle it
    *Minor code changes
    Version 1.4.1
    *Now checks for updates on server startup
    Version 1.4.0
    *Do not attempt to create chests in the Void
    Version 1.3.2
    *Configuration cleanup and changes, bug fixes for initial public release
    Version 1.3.1
    *Add Lockette support
    Version 1.3
    *Convert from Tombstone to Cenotaph
  2. Offline


    Thank you for the welcome back, everyone. :)

    Yes, frog! I'm hoping to get to it and officially publish Cenotaph v2 this weekend.
    frog and Inscrutable like this.
  3. Offline


    I get this error when dying from a mob or /kill
    Other players it works perfect.

    19:10:56 [SEVERE] Could not pass event org.bukkit.event.entity.PlayerDeathEvent to Cenotaph
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(
            at net.minecraft.server.EntityPlayer.die(
            at net.minecraft.server.EntityLiving.damageEntity(
            at net.minecraft.server.EntityHuman.damageEntity(
            at net.minecraft.server.EntityPlayer.damageEntity(
            at net.minecraft.server.EntityLiving.b(
            at net.minecraft.server.EntityHuman.b(
            at net.minecraft.server.Entity.a(
            at net.minecraft.server.EntityPlayer.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(
            at net.minecraft.server.MinecraftServer.w(
    Caused by: java.lang.reflect.InvocationTargetException
            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)
            ... 19 more
    Caused by: java.lang.NullPointerException
            at com.MoofIT.Minecraft.Cenotaph.Cenotaph$eListener.getCause(
            at com.MoofIT.Minecraft.Cenotaph.Cenotaph$eListener.createSign(
            at com.MoofIT.Minecraft.Cenotaph.Cenotaph$eListener.onEntityDeath(
            ... 24 more
  4. Offline


    Hi. I'm having a permissions issue using Cenotaph 2.0 - When anyone dies without a chest, the inventory drops as if they don't have the permission. When I revert to 1.6.6 this doesn't happen. I'm using bPermissions, any ideas?
  5. Offline



    Hi Southpaw, I'd like to request a new feature, shouldn't be too hard to implement.

    I'd like to deny cenotaphs dropping in towny arena plots, the check for this is pretty simple.

    The releveant towny code

    If you could add an option in the config to enable townyintegration that would make it an easy setting for admins.

    If you have any questions drop into the Towny irc linked in my signature.
  6. Offline



    Your plugin is very nice.. But cenopath 2.0 dont work with my server, so im using 1.6.6
    plugin works fine.. lockette lock him. but i want to change configuration file! problem is beacuse version is outdated so plugin cant download. Can anyone send me configuration file (.yml) thank you very much

    sorry for my bad english

  7. Offline


    Eek. What's not working, The_Matto? Are you getting any errors? What happens that isn't expected?

    Update! At last! Cenotaph is alive again. Thank you, thank you, everyone, for your insane patience and understanding.
    [Version 2.1]
    - Added option for level-based time removal
    - Added requirement for Lockette sign to be carried in inventory (free sign permission available)
    - Added option to disable in specific worlds by name (Ping: Shooty)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  8. Offline


    Good to see you back, Southpaw018!
    I just gave the latest release a whiz using CraftBukkit++ Build 79 (built on RB4)... error below crops up.
    It went on to hook into Lockette 1.4.9 after this error :?
    I rolled back to 2.0, and no errors were seen on startup. Any ideas?

    2012-02-14 20:35:30 [SEVERE] Error occurred while enabling Cenotaph v2.1 (Is it up to date?): For input string: "false"
    java.lang.NumberFormatException: For input string: "false"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Long.parseLong(Unknown Source)
        at java.lang.Long.valueOf(Unknown Source)
        at com.MoofIT.Minecraft.Cenotaph.Cenotaph.loadTombList(
        at com.MoofIT.Minecraft.Cenotaph.Cenotaph.onEnable(
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(
        at net.minecraft.server.MinecraftServer.t(
        at net.minecraft.server.MinecraftServer.a(
        at net.minecraft.server.MinecraftServer.init(
  9. Offline


    Ohhh shit. Whoops. Saved cenotaphs won't load properly between 2.0 and 2.1. I didn't handle that case. Sorry!! :(

    Uh..I'll fix it soon. Can't right now - at work. :(

    Inscrutable likes this.
  10. Offline


    video please!
  11. Offline


    Err. Video of what?

  12. Offline


    Just quoting this, hopefully you respond. If you don't want to add this, the towny dev might do a pull request for it.
  13. Offline


    Sorry, LlmDl, I should have pinged you in my above post. I will add this, but I cannot guarantee a timeframe. :)

    Also! I believe the Lockette sign carry was your request long, long ago. Finally in!

    LlmDl likes this.
  14. Offline

    Don Redhorse

    would you ask him to do something similar for DeathTpPlus? :) I can under stand though why he wouldn't...
  15. Offline


    I don't want to use deathtpplus, but if you want to add towny-support to your plugin we'd mention you on Towny's pages. The api for towny can allow all sorts of plugins join into towny fun.
  16. Offline


    [Version 2.1.1]
    - Fix issue loading .db save files from pre-2.1 versions (Thanks, Inscrutable)
  17. Offline

    Don Redhorse

    oh, I don't want to drag you away from Cenotaph... just wanted to get a similar pull :)

    I will not integrate region systems I don't use atm... but a pull would be welcome.. in the end, I can understand why a developer wouldn't create a pull request too.
  18. Offline


    I have a question about these 2:

        #Immediately remove cenotaph once it is empty, overriding all other timeout options
        removeWhenEmpty: true
        #Never remove a cenotaph unless it is empty
        keepUntilEmpty: true
    Are they intensive only at removal? Or do they cause constant CPU use? Should they be ok to use on a dedicated server with a small user base?


    EDIT: Also, it looks like Enderman need to be added to the monster list in the config.
  19. Offline


    Let me explain what those do on the backend: Cenotaph runs its removal check every 5 seconds. When it does so, it scans all active cenotaphs on the server to see if their security time is up and if their break time is up. If you enable either of those options, Cenotaph will instead check the inventory of every active cenotaph on the server every time it runs a removal check. This is a much more difficult task than just checking the removal times, which is stored in Cenotaph's running memory and is extremely fast.

    So, the direct answer to your question is: less chests to check, less CPU required. On a smaller server, assuming you have less total active cenotaphs than a larger server, you should be fine.

    Finally, note that enabling both options will cause no additional processor time increase over just enabling one.

    Does that answer your question? :)

    Also! Eep, I haven't updated that monster list since something like beta 1.6. I'll add the new mobs in the next release!

  20. Offline


    Pseudo-code, assuming I understood what you meant:

    for(Cenotaph ct : cenotaphs) {
      ItemStack[] stacks = ct.getContents();
      if(stacks.length == 0) {
    Assuming people don't die constantly, even on a busy server this can hardly be intensive being run every 5 minutes? If threaded you could also spread the loop out over that timespan.

    (Again, assuming I understood)
    Tanite likes this.
  21. Offline


    You've got the basic info, yes. It's run every 5 seconds, and it is threaded. I just checked the Bukkit APIs, and it appears that some methods for determining the contents of a chest have been added since I wrote this code many months ago. At the time, the only way to determine if the chest was 100% empty was to iterate through every single one of its slots and check - which is what this code currently does. With what I've learned since then and the new methods available, I should be able to come up with something that's significantly less heavyweight in my next release. Stand by - and thank you, gentlemen, for bringing things like this up! It helps make Cenotaph a better plugin for everyone. :)

    Tanite and troed like this.
  22. Offline


    Very nice. Thanks for the prompt info :)
  23. Offline

    Don Redhorse

    you should look though that you only use thread safe methods to remove the cenotaphs... otherwise you could see issues and nolagg will complain about it.

    Would be nice if you give me a heads up on this so I can make the changes too... if you need any help with anything just ask.
  24. Offline


    Thanks for the offer, Don! Point by point:
    • Cenotaph (and my other plugins) should all be threadsafe.
    • You can always watch the repository on Github for the latest changes. I'll also ping you when I push tested code for this particular optimization.
    • I didn't know about NoLagg. I'll have to run my plugins through it to ensure it isn't picking them out.
  25. Offline

    Don Redhorse

    I will WATCH you... :)
  26. I love this plugin. The only problem I have with it is if you spend a lot of time building a nice building with lava flowing freely around it or something like that. If someone dies in the lava then the chest being dropped gets in the way of the lava so the lava flows around it. This could easily fill a room with lava if you're unlucky.
  27. Offline


    Players do not seem to be getting Lockettes on their Cenotaphs using version 2.1.1 (CB 1940, Lockette 1.49, PEx 1.18).
    Same config as usual, I have not seen any errors in the log. Previous versions (1.6.6, 2.0) seem OK.
  28. Offline


    Sorry! I should have made this much clearer: in 2.1+, I've added the ability to require your users to carry a sign for Lockette in addition to one for the sign on the cenotaph. If you want your players to continue receiving free Lockette signs, you'll need to give them the permission cenotaph.freelockettesign.

    Inscrutable likes this.
  29. Offline


    I cannot seem to activate the free chest on death. Any help would be appriciate.

    bukkit 1.1V4
    Latest Cenotaph

    I looked all thru the config.yml. added all the permissions that seemed to apply in everyplace in Group Manager they seemed to go. I am also use MCMyAdmin so any pointers towards making it work with that are welcome also.
  30. Offline


    Bukkit 1.1-R7
    Lockette 1.5.0
    Cenotaph 2.1.1

    Working unchanged configuration from many many versions back, only change is the added permission lockette.freelockettesign

    Killed by creeper. Inventory scattered, including an unplaced (single) chest and a sign. Creeper explosion caused no damage except two blocks next to eachother (like a big chest .. ) in the floor.

    All Cenotaph messages appeared as if it had worked.

    edit: Tomb also added to db:

  31. Offline



    I'm getting this with 2.1.1:

    10:22:53 [WARNING] Task of 'Cenotaph' generated an exception
            at org.bukkit.craftbukkit.inventory.CraftInventory.getSize(
            at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(
            at com.MoofIT.Minecraft.Cenotaph.Cenotaph$
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(
            at net.minecraft.server.MinecraftServer.w(
    I'm on CB1938.

Share This Page