[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

    then your friend must have the chestlock.admin node
     
  3. Offline

    Sefragus129

    no he used his hands...
     
  4. Offline

    Codisimus

    UPDATE!
    Now works with build #602
     
  5. Offline

    TuRmoiLxx

    really helpful!
     
  6. Offline

    Codisimus

    Update!
    Added option of setting lock tool to "any"

    now you can make it so users can lock/unlock chests with anything in their hand

    works with build #612

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

    crakdmirror

    Does this work on dispensers/forges? Those tend to have valuables in them as well.

    If not, how hard would it be to support those?
     
  8. Offline

    Codisimus

    I support them when I implement door locks too
     
  9. Offline

    Stabu2Dead

    This might be a stupid question, I am not sure. However, If I add this plugin to a map with already made chest. Will it mess them up in any way?
     
  10. Offline

    dortan

    Getting this error when Trying to left click a locked chest.
    Also, I made the test and anyone can destroy a locked chest, even if he's not the owner of it.

    Code:
    08:51:36 [SEVERE] Could not pass event PLAYER_INTERACT to ChestLock
    java.lang.NullPointerException
            at ChestLock.Safe.isCoOwner(Safe.java:60)
            at ChestLock.ChestLockPlayerListener.onPlayerInteract(ChestLockPlayerLis
    tener.java:101)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:217)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:64)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:356)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    >
    
     
  11. Offline

    Codisimus

    no it won't
    do the other players have the chestlock.admin node?

    EDIT: try deleting your config file and starting over
     
  12. Offline

    peas

    hello

    I like this mod alot, seems to work..but chests are still breakable -- how do I fix?
     
  13. Offline

    Codisimus

    yes i apologize, upgrading to 1.4 screwed it up, i fixed it and am uploading the new version now
     
  14. Offline

    peas

    good to hear, its up already??
     
  15. Offline

    Xem*

    Very nice little mod there.
    I was having major problems trying to get the Lockette mod working and i found this and worked straigt away with no issues - Good work!

    Havnt really had change to look through te forum but was wondering if you would be adding door / furnace / dispenser locks aswell? would love to see that added with the mod.
    Noticed the chests are breakable, would be great if you could get it so only the owner / admin can break the chest. Didnt notice anything drop from the chest when it was broke, not sure if i didnt realise i picked the item up or or if the item inside despawned.

    Anyway, loving the mod - Keep it up.
     
  16. Offline

    Codisimus

    only owner/admin can break chests (though right now that is broken and will be fixed within minutes) and i will be adding furnaces and dispensers to work just like chests, and doors that players can set to open with a specific key (item in hand)

    @peas
    @Xem*

    version 0.6.3
    Fixed chests being broken by anyone

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

    peas

    awesome man ! thanks a ton

    erm..

    just updated

    and its still breakable =x


    Code:
       Admins:
            default: false
            info:
                prefix:
                suffix:
                build: true
            inheritance:
                - Moderator
            permissions:
                - '*'
                - '/region'
                - '/god'
                - '/heal'
                - '/locate'
                - 'chestlock.admin'
    my world and config files in permissions

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

    Neon_Bible

    yep, happens to me too

    error log:

    Code:
    23:20:50 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-609-g39996e1-b612jnks (MC: 1.4)
    23:20:50 [INFO] Preparing level "world"
    23:20:50 [INFO] Preparing start region
    23:20:50 [INFO] 144 recipes
    23:20:51 [INFO] Minecart Mania Core version 1.06h is enabled!
    23:20:51 [INFO] Minecart Mania Chest Control version 1.06c is enabled!
    23:20:51 [INFO] ChestLock 0.6.3 is enabled!
    23:20:51 [INFO] [xWarp]: 23 warps loaded
    23:20:51 [WARNING] [xWarp]: Permission system not found. Use defaults.
    23:20:51 [INFO] [xWarp]: xWarp 2.7.3-upstream enabled
    23:20:51 [INFO] Minecart Mania Admin Controls version 1.06 is enabled!
    23:20:51 [INFO] Minecart Mania Autocart version 1.06 is enabled!
    23:20:51 [INFO] Minecart Mania Automations version 1.06 is enabled!
    23:20:51 [INFO] Minecart Mania Pressure Plates version 1.06 is enabled!
    23:20:51 [INFO] Minecart Mania Sign Commands version 1.06 is enabled!
    23:20:51 [INFO] NoExplode version 1.4-stoneLeaf is enabled!
    23:20:51 [INFO] Minecart Mania Station version 1.06 is enabled!
    23:20:51 [INFO] Done (0,125s)! For help, type "help" or "?"
    23:20:55 [INFO] Neon_Bible [/192.168.1.4:53922] logged in with entity id 89
    23:20:56 [INFO] [Minecart Mania] Loading Sensor Data.
    23:21:14 [INFO] JIKO [/188.82.92.250:53173] logged in with entity id 215
    23:21:23 [INFO] Player [/192.168.1.4:53932] logged in with entity id 5993
    23:21:26 [SEVERE] Could not pass event PLAYER_INTERACT to ChestLock
    java.lang.NullPointerException
        at ChestLock.Safe.isCoOwner(Safe.java:60)
        at ChestLock.ChestLockPlayerListener.onPlayerInteract(ChestLockPlayerListener.java:101)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:214)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:64)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:356)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
    Edit:

    Tried 612 - 619 and the latest one, no sucess.
     
  19. Offline

    Codisimus

    redownload newest version
     
  20. Offline

    Neon_Bible

    worked! <3
     
  21. Offline

    Codisimus

    good! sorry about that
     
  22. Offline

    peas

    awesome, thanks for the quick response :)
     
  23. Offline

    Drtrider

    Quick Question, Can this work with doors? Or be made to work with doors as well?
     
  24. Offline

    Codisimus

    yes soon i hope,
     
  25. Offline

    Donny

    IDK if its Permissions messing up like it is on several other plugins, but this isn't working correctly. Admins with all permission "*" cant unlock chests and users are complaining that they cant get in their own chests
     
  26. Offline

    Pomme72

    Hi guys !

    Don't work for me, anyone can break the locked chest :(
     
  27. Offline

    dortan

    This is what append when A User breaks is OWNED chest.
    As soon as the chest is disowned, the error won't append anymore.
    It's the same thing if an admin break anyone's owned chest.

    Code:
    08:33:02 [SEVERE] Could not pass event BLOCK_BREAK to ChestLock
    java.util.ConcurrentModificationException
            at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
            at java.util.LinkedList$ListItr.next(Unknown Source)
            at ChestLock.ChestLockBlockListener.onBlockBreak(ChestLockBlockListener.
    java:39)
            at org.bukkit.plugin.java.JavaPluginLoader$30.execute(JavaPluginLoader.j
    ava:345)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at net.minecraft.server.ItemInWorldManager.d(ItemInWorldManager.java:156
    )
            at net.minecraft.server.ItemInWorldManager.b(ItemInWorldManager.java:117
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:359)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    >
     
  28. Offline

    jyggen

    Get the same error message if someone breaks a chest.
     
  29. Offline

    Neon_Bible

    yellow,

    It was working just fine until I installed the new version of Runecraft.
    do you reckon where it may be conflicting?
    as I believe Runecraft ain't gonna change there method, I wish you could <3

    there are no errors in the console, but anyone can open a locked chest.
    thanks <3
     
  30. Offline

    peas

    I don't get how co-owner works?
     
  31. Offline

    dirkson

    Any word on the mysql release? I am really looking forward to switching to this thing.
     

Share This Page