[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

    XxFuNxX

    Looks Cool! :)
     
  3. Offline

    Odjit

    When I punch it again to lock, it goes:
    "chest is now locked
    Chest is now unlocked"

    In the one swing.

    But it is locked, it just double sends the message.
     
  4. Offline

    Codisimus

    whoops, forget an "else"
    I fixed it, just redownload Version 0.1
     
  5. Offline

    Odjit

    Some of my players brought up a problematic issue:
    -If they accidentally hit a chest and thereby claim it, the only way to unlcaim it is by 'griefing' and breaking the chest. Then they'd have to clean up all the contents, etc etc.

    So with that, could there be a command, or perhaps like (to keep it simple), smacking a chest with a dirtblock or something to 'disown' a chest with more grace?
     
  6. Offline

    Codisimus

    great idea with the dirt. ill try that
     
  7. Offline

    Odjit

    >< I blame being exhausted on missing this stuff, but staff pointed out:
    It would be nice if admins could see inside, or perhaps unlock/lock a chest despite whoever is owner, so we can make sure people aren't stashing duped stuff.
     
  8. Offline

    Codisimus

    how about admin can unlock with dirt if they arent owner?
     
  9. Offline

    blinghung

    Ya would be nice XD
     
  10. Offline

    Codisimus


    Both features are included in Version 0.2
     
  11. Offline

    x3point14x

    Would it be possible to make it so it only locks if punched with a certain item? Perhaps a stick?
    Also adding the ability to allow other players to lock/unlock a chest would be great.

    Awesome plugin btw nice and simple but works perfectly.
     
  12. Offline

    Odjit

    Love it, just one more request:
    Allow admins to remove ownership. When breaking it, they're able to remove the chest and open the items, but the coordinates remain claimed to the player. I want this so that if a player claims a chest in another player's home, we can remove it, and the coordinates won't be forever saved.

    Edit:Actually, bug problem:
    If a player places another 'Chest B' by that 'Chest A' that is locked (creating a double chest) they can access that locked 'Chest A' (owner being another player) and get the items from it by the association.


    x3point14x: for your second request, do you mean only allowing certain people as defined by the owner? Cause otherwise that would sort of undermine the purpose of locking it.
     
  13. Offline

    Spurux

    Nice =)
    Simple, and easy to use.

    It would be nice if you could make it like... Invulnerable while it's locked.
    Griefers are able to just smash the chest and then take what was inside it q=
     
  14. Offline

    Infernus

    I think that if Permissions isn't active, that every OP should be able to access the chests. Also, I think it would be good to make the possibility to add co-owners to the chest. Also, it would be nice if you could choose between two protecting modes: Passworded, or just accessable by the owners and co-owners. Also I agree with Spurunx.

    If you do not like these ideas, let me know because then I will code my own plugin for this and ofcourse not make it public because this is your work ;)

    Nice job already making this! :)
     
  15. Offline

    Codisimus

    I will soon add a config file to determine what you need to punch it with (if anything)
    Will make it disown on break, and fixing the double chest bug should be easy (ill post it in about an hour)
    They shouldnt be... only users who have the chestlock.admin node can break the chest (and the owner of course)
    using Op as permissions is supported in the latest version, i will most likely add coowners since others suggested it too. However i will proly not add a password option. If you want to add it yourself just ask for the source code :)
     
  16. Offline

    Greylocke

    Looks cool! I like the fact that no console commands are required.

    Some ideas:
    doors - use this same system for doors
    keys - owner can quickly r-click 3 times with an item in hand to set the item as the key. This would allow clan/group access. Just tell your trusted group which key item to use.
     
  17. Offline

    Codisimus

    both great ideas

    in other news, UPDATE!

    Fixed double chests
    Added disown on break
    Added config to define tools
    Added commands for coowners and to toggle lock
     
  18. Version 3 won't work on our server.

    We run CraftBukkit 556 (recommended build), and ChestLock v0.2 works just fine on our server.

    Code:
    2011-03-24 19:11:29 [SEVERE] null loading ChestLock v0.3 (Is it up to date?)
    java.lang.NullPointerException
        at ChestLock.ChestLock.loadConfig(ChestLock.java:103)
        at ChestLock.ChestLock.onEnable(ChestLock.java:50)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-24 19:11:29 [INFO] ChestLock Successfully linked with Permissions!
     
  19. Offline

    Codisimus

    older versions work? anyone else having issues?
     
  20. Sorry, I edited the last post to include that info right before you posted this.
     
  21. Offline

    Codisimus

    i noticed... try deleting the ChestLock folder and try it again
     
  22. We tried that twice.

    We started with the v 3, and then when it didn't work we switched to v 2.
     
  23. Offline

    Codisimus

    maybe take out all plugins but chestlock and see wut happens...
     
  24. That wouldn't work well on our server, we have like 20 people on at any given time.
     
  25. Offline

    Codisimus

    I meant for just long enough to see any errors
     
  26. Offline

    Odjit

    I run on CB 559 and it loads in just fine. Will do some testing with it in a moment.

    Double chest is still not working- I don't need to claim the second chest, it automatically seems to be (after the first chest is claimed), as I can lock and unlock it. However, it being 'locked' as it claims to be, is not actually having it be locked. Players can still get in via the second chest and access the other chest's contents, and of course, the not-locked-second-chest-that-claims-to-be-locked's contents as well.


    In addition, admins using dirt doesn't seem to bring up the owner anymore (it was in v2), nor can the admin remove the ownership.

    Normal player commands work fine.

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

    Codisimus

    UPDATE!
    • Fixed double chests
    • Changed admin info to to Air by default (dirt is set to toggle lock)
     
  28. Offline

    Odjit

    Admin stuff still isn't working :( It doesn't show who the owner is, and while I can break the chest (indicating the plugin does recognise me as an admin, and I'm not forgetting the permission or something silly), it doesn't do anything besides barf the contents. And of course, still can't remove ownership.

    But the double chest stuff is working swimmingly! Yay!
     
  29. Offline

    Codisimus

    ok updated (took way to long to find those missing brackets) all known bugs are fixed and sand is set as default Admin disown tool
     
  30. Offline

    Odjit

    ;D Annnd it all works wonderfully now <3.

    Actualllyyyyy getting :
    when I threw it on the main server ;x. It has the same configuration as the test server, (where I directly copied the files from) so I am a bit confused.
    It still loads, but it doesn't use the configuration file. (Which I want cause I switched the player ownership detect to another block to avoid rampant chest locking by accident)

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

Share This Page