[MECH] ChestLock v1.1 - Simple locking solution for Chests, Furnaces, and Doors [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 23, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    ChestLock - Simple locking solution for Chests, Furnaces, Dispensers, and Doors:
    Version: 1.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions
    Download Page

    1.) Create a chest
    2.) Punch it
    • Now you are the owner and the chest is locked!
    3.) Punch it again
    • Now the chest is unlocked!
    To Lock a Door:
    1.) Target the door and type "/lock"
    • The item in your hand is set as the key
    • Users can't open that door unless they have that type of item in their hand
    2.) Target the door and type "/lock" while holding nothing
    • You are set as the owner and the door cannot be locked
    -----------------------------------------------------------------------
    • When a chest is locked noone can open it, (not even the owner)
    • When a chest is unlocked everyone can open it.
    Only the owner can unlock/lock a chest.
    • If a non-owner tries to, they will be told that it doesn't belong to them.
    • If an admin* tries to, they will be told who the owner is.
    • An admin* can however unlock a chest if he is holding dirt (configurable)
    Only the owner and admins* can destroy owned chests
    • In order to disown a chest a player must punch it with dirt (configurable)
    *admins are defined by having the permission node chestlock.admin (or isOp() if Permissions is not installed)

    Features:
    • Simple lock/unlock
    • Lock Chests, Furnaces, Dispensers, and Doors
    • Configure which items unlock/own/disown
    • Add Coowners who can also lock/unlock
    • Add coowner "any" to allow anyone to lock/unlock
    • Make chests/doors unlockable so users can't claim them
    • Set certain keys to open doors.
    • Quick to make (no looking up confusing commands) Just Punch it!
    • Customization of messages
    • Uses iConomy, BOSEconomy or Essentials to charge users money for owning/locking
    • Permissions allow admin abilities
    • MultiWorld support
    Commands:
    • /coowner [Name] - Add [Name] as co-owner of target chest
    • /coowner any - Allow anyone to lock/unlock the target chest
    • /lock - Lock/Unlock target chest
    • /lock - Set item in hand as key to target door
    • /lock never - Make target chest/door unlockable (must be owner first)
    Permission Nodes:
    • chestlock.admin - defines user as an admin
    • chestlock.own
    • chestlock.lock
    • chestlock.unlockable
    • chestlock.coowner
    • chestlock.usekey
    • chestlock.free
    Review by JamesACosten:

    Tutorial By 0zyke:

    Other vid showing many other plugins by me:


    ToDo:
    • Add iron door support
    • Add MySQL support *I give up trying to get this to work. If someone wants to help me I'd appreciate it
    Changelog:
    Old Versions + ChangeLog can be found at Download Page
    Show Spoiler

    Version 1.1 (7/16/2011)
    • Fixed locking chests with /lock
    • Added lock cost
    • Added color support for all customizable messages
    Version 1.0 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Added iron door support
    Version 0.9.1 (6/13/2011)
    • Fixed chest unlocking
    • Fixed door locking
    Version 0.9 (6/12/2011)
    • Cleaned up code/fixed errors
    • Added option of save file cleanup
    Version 0.8.4 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 0.8.3 (6/3/2011)
    • Various fixes and code cleanup
    Version 0.8.2 (6/3/2011)
    • Added Essentials econ support
    • Added option of explosion protection
    • Fixed block break throwing errors
    Version 0.8.1 (5/4/2011)
    • Updated to iConomy 5
    • Few various fixes
    Version 0.8 (4/29/2011)
    • Added many permissions nodes
    • Added customization of messages
    • Added iConomy support
    • Added global key for Admins
    Version 0.7 (4/15/2011)
    • Added support for Furnaces, Dispensers, and Doors
    • Fixed coowners
    • Added option for coowner "any" to allow anyone to lock/unlock
    • Added option to make chests/doors unlockable so users can't claim them
    • Added option to set certain keys to open doors.
    • Improved save system (no more erased data)
    • Improved multiworld support
    • Fixed all known bugs
    Version 0.6.3 (4/2/2011)
    • Fixed chests being broken by anyone
    Version 0.6.2 (3/31/2011)
    • Few minor fixes
    • Works with build #612
    Version 0.6.1 (3/31/2011)
    • Added option of setting lock tool to "any"
    Version 0.6 (3/30/2011)
    • Updated to craftbukkit build #602
    Version 0.5 (3/25/2011)
    • Various fixes
    • Sand set as default Admin disown tool
    Version 0.4 (3/24/2011)
    • Fixed double chests
    • Changed admin info to to Air by default (dirt is set to toggle lock)
    Version 0.3 (3/24/2011)
    • Fixed double chests
    • Added disown on break
    • Added config to define tools
    • Added commands for coowners and to toggle lock
    Version 0.2 (3/24/2011)
    • Added disown with dirt
    • Added admin open with dirt
    • Added isOp() if permissions is not present
    Version 0.1 (3/23/2011)
    • Initial Release
     
    migato, GameFreakDude and Sefragus129 like this.
  2. Offline

    Codisimus

    /lock never - Make target chest unlockable (must be owner first)
    or
    /coowner any - Allow anyone to lock/unlock the target chest
     
  3. Offline

    peas

    I've never gotten the /coowner to work, maybe my version is too old? Will try to update with latest reccomended craftbukkit.

    21:02:00 [SEVERE] ChestLock/ChestLockSaveLoad loading ChestLock v0.6.3 (Is it up to date?)
    java.lang.IllegalAccessError: ChestLock/ChestLockSaveLoad
    at ChestLock.ChestLock.onEnable(ChestLock.java:50)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:584)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)


    :/ ?

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

    Codisimus

    coowners is disabled on most older versions
     
  5. Offline

    peas

    any idea on that error? I get that every time I update
     
  6. Offline

    Codisimus

    0.7 was a large update and shouldn't give you that error (also coowners is working in 0.7)
     
  7. Offline

    peas

    also, any update that makes chest invulnerable to creeper/tnt xplosions?

    tried updating again, still same errors

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

    PowerSet

    Probably the same effect as if you're too close to a door you can't open it. Maybe a door has it's own weird hitbox or something.
     
  9. Offline

    SiKiN

    Hey great idea here mate, but unfortunately I've been having a major issue with mine however for around 3 weeks and I should have come here and report it but I was a stupid admin and did not believe my lemmings about their problems as I trusted this mod.

    This mod is not saving upon re-log. If a player re-logs to test this it will keep the chest locked but if a player logs out then another player can simply open the chest. Players chests are also being forgotten about when re-logging after long periods of time such as 5 hours.

    At the moment no one on my server trusts this plugin. Is there something I'm doing wrong? Why is this plugin being useless.
     
  10. Offline

    Codisimus

    I'm just gonna ask you to try the new version when I update tonight, it should fix those issues. If it doesn't let me know.
     
  11. Offline

    Conkerthekiller

    Hey how do you destory doors after you lock them, i have a random door in my hall and i cant break it
     
  12. Offline

    hAvAAck

    I'm admin and owner of a furnace and I can't break it, even with sand. What am I doing wrong?
     
  13. Offline

    Codisimus

    Update! check the changelog for new features.
    delete old config file to access new settings
     
  14. Offline

    hAvAAck

    success, this allowed me to disown the furnace and then destroy it
     
  15. Offline

    Codisimus

    ok good, not sure why that was happening but I basically rewrote most of the code and cleaned it up a lot to eliminate those errors
     
  16. Offline

    hAvAAck

    How do I remove a key from a door? I set the key to say, sand and dirt, but I only want it to be dirt, how do I remove sand? I tried breaking the door and resetting it, no luck. I tried locking it again with dirt and sand still works. I tried /lock with sand to undo, but it doesn't work.

    is this possible?
     
  17. Offline

    Codisimus

    when you lock it with dirt it should overwrite sand and only open with dirt... perhaps its an issue of the door being two blocks. Does this happen on both the bottom and top?
     
  18. Offline

    hAvAAck

    yeah sand and dirt open and close it on both the top and bottom, but glowstone doesn't open it on either, so it is locked.
     
  19. Offline

    Codisimus

    can you post your save file?

    EDIT: hold on I think ik the problem

    EDIT:
    AdminGlobalKey=dirt //this is the default setting, so if your an admin (chestlock.admin) you can always unlock the door with dirt
     
  20. Offline

    hAvAAck

    okay, I didn't realize the dirt and sand stuff from the chests applied to the doors as well
    THANKS! great plugin, btw
     
  21. Offline

    Codisimus

    Well it doesn't apply, I just recently added a new tool so admins can always unlock doors
     
  22. Offline

    Vermino

    to do: Add option of explosion protection

    anyway you can add a permission node for this as well?

    also love all your plugins (phatloots is amazing)
     
  23. Offline

    peas

    every time I update, it breaks...wut do?


    Code:
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    16:39:27 [INFO] [GeneralEssentials] hooked into Permissions.
    16:39:27 [INFO] Launched GeneralEssentials v1.1.1
    16:39:27 [SEVERE] Could not pass event PLUGIN_ENABLE to ChestLock
    java.lang.NoSuchFieldError: economy
            at ChestLock.PluginListener.onPluginEnable(PluginListener.java:27)
            at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    16:39:27 [SEVERE] Could not pass event PLUGIN_ENABLE to ChestLock
    java.lang.NoSuchFieldError: economy
            at ChestLock.PluginListener.onPluginEnable(PluginListener.java:27)
            at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    
     
  24. Offline

    Codisimus

    it seems like your using an old config file (or dont have it fully filled in)
     
  25. Offline

    hAvAAck

    double doors don't stay locked
    is there a control preventing this? thanks!
     
  26. Offline

    dshadows07

    Hi, having a couple of issues with ChestLock on the server, just updated from 0.7 and the issue seems to persist. When the server is restarted or the /reload command is used, some of the chests 'break' and cannot be owned or locked anymore.
     
  27. Offline

    heifinator

    Having an issue where anyone can destroy and chest. Any insight? =)
     
  28. Offline

    LucidLethargy

    So I love this plugin, it's an AMAZING addition to my server, but I happen to only use the keylock feature... As such first things first: Thank you for adding permissions! Unfortunately, the message that comes up anytime anyone punches a door, chest, furnace, etc. "You do not have permission to do that" is leading some of my users to feel restricted, when in reality I don't even give myself that feature. Is there some way in a future version we could turn that off, or have an option to do so? Perhaps this is even permissions itself doing it?

    Honestly, the punch to lock thing is a lot more "minecraft" than lwc, and I like it more, but I simply have EVERYTHING set up with LWC, so the thought of reversing all of that, and ensuring everyone re-locks is a bit too much to handle XD

    Anyway, just a suggestion - thank you again for sharing all your plugins! I'm using 3 of them, and they are all helping me make one hell of a quest system!
     
  29. Offline

    AlexanderDrake

    I'm having a small issue with the locking of doors
    I can select a key and lock it to that, but it appears only I am limited when I do that, players can open and close the doors with no issue even without the key
     
  30. Offline

    Kamineru73

    I de-opped my other account, and they could still break the chest :/
     
  31. Offline

    Codisimus

    In the config you can set wut blocks are lockable. Set all but door to false
     

Share This Page