[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

    Mhalkyer

    Can the 'own' and 'lock' tool be the same without a problem?

    Also could you please add the ability to charge the user for each time they 'lock'?
     
  3. Offline

    HowdyDonut

    Alright so I put in permissions and all, but it's not working? It keeps saying I don't have permission to do that. Even though I can smash the chest, but the thing is. I can't lock it or unlock it, I punch it, and the same message pops up. "You do not have permission to do that" I'm also and op, so I don't know what I'm doing wrong, could you help me out?
     
  4. Offline

    Codisimus

    you should be able to use the same tool without a problem
    I will add a cost for locking
     
  5. Offline

    Mhalkyer

    awesome! could you please add lockpicking too?

    it could just be a static % chance of unlocking it. The tool could be customizable with they're own success %, like:

    iron bar/tool - 15%
    gold bar/tool - 20%
    diamond bar/tool - 25%

    just a thought =D
     
  6. Offline

    Codisimus

    I'll think about it, seems like a lot of work though
     
  7. Offline

    Mhalkyer

    Haha, ok ok. Here's so psuedo code:

    if player right click
    if block==CL_chest && player holding id==lockpick_tool​
    if random number >= lockpick_percentage​
    unlock!​
    else​
    remove item​
    endif​
    endif

    Feel free to use it, XD
     
  8. Offline

    Craigdb

    I have tried this mod and it works great... for the most part. It is too easy for users to "own" chests accidentally. I have had to reprimand users on my world for this (and I want to have "public" chests). I have also seen wierd quirks when using with runecraft. After teleporting, the plugin seems to turn off, another teleport and it works again. I don't know if you want to look into these. Otherwise it works great at keeping my 4 yr old out of my stuff ;)
     
  9. Offline

    Codisimus

    remove item... good idea, I was thinking how to prevent them from just keep trying

    change the own tool in the config perhaps?
     
  10. Offline

    aykutmania

    Why can owners not open the chest when it's locked? For me.. it doesn't make sense to unlock before open :( Can you fix this asap pls?
     
  11. Offline

    rudolfs001

    My issue: as an admin I cannot use any item to disown a chest that someone else owns.
    I can check who owns the chest and unlock/lock with dirt,sand,stick,air, but once I put any of these into the admindisown section, I cannot disown their chest.
     
  12. Offline

    Convictjones

    I love this plugin! Is there anyway to make it configurable for the key to disappear after the door has been unlocked by the user? :)
     
  13. Offline

    Codisimus

    @Mhalkyer
    UPDATE!
    Added lock cost, color support and some fixes
     
  14. Offline

    GameFreakDude

    With this update, if I try to /lock a door, it just says "/lock /lock never"
    and chests don't lock at all D:
     
  15. Offline

    Madmusk

    I agree with this suggestion. Why can't owning a chest give you the ability to open it without having to unlock it? Having to unlock and then lock every single time just wastes a lot of time when going through chests. Any chance you'd consider implementing this change? This is my only gripe with an otherwise great plugin.
     
  16. Offline

    GameFreakDude

    Huh; I seem to have fixed this, somehow. >:?
     
  17. Offline

    AVirusC

    RB 1000


    2011-07-19 08:35:44 [SEVERE] Error occurred while enabling ChestLock v1.1 (Is it up to date?): null
    java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:417)
    at java.lang.Integer.parseInt(Integer.java:499)
    at ChestLock.ChestLock.loadConfig(ChestLock.java:131)
    at ChestLock.ChestLock.onEnable(ChestLock.java:55)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  18. Offline

    AVirusC

    Did a config regen and it fixed it. My bad.
     
  19. Offline

    blahblahjam

    Code:
    21:09:53 [SEVERE] Error occurred while enabling ChestLock v1.1 (Is it up to date?): null
    java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:417)
        at java.lang.Integer.parseInt(Integer.java:499)
        at ChestLock.ChestLock.loadConfig(ChestLock.java:131)
        at ChestLock.ChestLock.onEnable(ChestLock.java:55)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Hi, I just started a new bukkit server. I installed the plugin and I got that. What should I do?
     
  20. Offline

    FoxTech

    I notice that when I use the /reload command on my server, the console spits back an [SERVERE] error with ChestLock saying that the plugin does not shut down properly and may cause problems when the plugin data reloads. Of course, problems do occur after using the /reload command. I use the dynamic map plugin and suddenly giant voids in the map (not actual game) sometimes develop in areas with chests and the chests that are there no longer have any ownership or can be claimed for ownership. Instead they function like normal chests.

    If you need specific errors or data, please ask and I will replicate the issues during a time that my server is less populated.
     
  21. I'm having a problem with /reload, upon using /reload, it seems to not register any locks?
    Situation - I lock a door to "item", player x cannot open that door without the "item" used (that works fine).
    The problem occurs after using /reload, player x can now open that door without using an item, the door itself, becomes unlocked. Not sure if it's something im doing wrong?
    No console errors from it either - using RB1000 & Chestlock v 1.1
     
  22. Offline

    BeTrayed

    Getting console errors on bukkit version 1000 ....

    Code:
    java.lang.NoClassDefFoundError: com/nijikokun/register/payment/Methods
    at ChestLock.PluginListener.<init>(PluginListener.java:16)
    at ChestLock.ChestLock.onEnable(ChestLock.java:58)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:878)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:272)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146
    )
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:380)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleComma
    ndMap.java:281)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3
    20)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: com.nijikokun.register.payment.Meth
    ods
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 21 more
     
  23. Offline

    Headsuphunter

    Can you add trapdoor that can lock?
     
  24. Offline

    Djjak90

    this could be really cool on my server, but can you make it so it's compatible with bukkit 1000? :3
     
  25. Offline

    Madmusk

    Is this plugin still actively supported? Hasn't been any developer activity since 7/16.
     
  26. Offline

    irongod7

    For some reason, when i hit a chest it doesnt say it has locked it or not and when i attempt to lock a door is says "/lock /lock never". Is something wrong with how I set it up or are other people having this same problem?
     
  27. Offline

    GameFreakDude

    That would be an issue with your configuration.
     
  28. Offline

    lemtzas

    Excellent plugin. I love the simplicity. May I request the option to not auto-lock the chest when it is purchased? Or, better for my purposes, prevent players from buying a lock for chests they didn't place?
     
  29. Offline

    Osku

    This needs to be updated.
     
  30. Offline

    PowerSet

    This seems to be working perfectly fine for me, I'm currently on 1060. Not sure if something changed and it wasn't working on previous versions, but perfectly fine in the latest build.
     
  31. Offline

    CyberNixon

    Thanks for this very useful plugin!

    Feature Request:
    There could be a permission that would make some users able to lock an infinite number of chests, but users without the permission would only be able to lock a predefined number of chests.

    Benefits:
    This may help prevent chest-lock griefing (where a user locks all the chests they can find). Also this would allow different levels of permissions where you had to 'rank up' in order to be able to lock all your chests. On my server, I like to keep it open and free (thieving is not discouraged), so if you can only lock 1 chest, then you have to make sure all your important items are in that chest.
     

Share This Page