[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

    QuadTAZ

    permissons question what is chestlock.free used for
     
  3. Offline

    GameFreakDude

    I assume that would be economy related, making access to the unit free.
     
  4. Offline

    Fredrikocrafter

    Well I am kinda new to this so no I don't know how to do that.
     
  5. Offline

    an0x

    hm is there an progress for the next update`? :D
     
  6. Offline

    dominichello

    I tried to change the item required for admin Global key too a golden sword. Im not sure on your imput ID method whether its names, Underscores for spaces or ID #s ...any way...I used this :

    AdminGlobalKey=golden_sword (which im guessing is wrong as it produced this error) :

    05:13:24 [SEVERE] Could not pass event PLAYER_INTERACT to ChestLock
    java.lang.NullPointerException
    at ChestLock.Door.hasKey(Door.java:64)
    at ChestLock.ChestLockPlayerListener.onPlayerInteract(ChestLockPlayerLis
    tener.java:180)
    at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.j
    ava:306)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:310)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:166)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:6
    3)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:453)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    This was caused in game then i then proceeded to open the door with any block/fist (air).

    Could u tell me the appropriate method for Identifying blocks. ( sorry if uv'e already stated it..but i had a quick look and couldn't find it)

    Perhaps you could change it as default too Block ID numbers..so there is no confussion ? < at least with me anyway :)

    Besides this the Chest locks work perfect :) great plugin
     
  7. I'm having a problem. Whenever I restart my server, all doors are unlocked and chests are no longer owned by anyone. I am hosting it with Multiplay and they have the latest version installed.

    I love this plugin, purely for the fact it's so simple and uses keys to unlock doors.
     
  8. Offline

    newyorkdaily

    Any ideas what this is about? I am using craftbukkit build #860. Please Keep in mind i replaced all minecraft usernames in the error to (_____) to protect identity
    Code:
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (________);world;615;89;-1704;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (_______);world;628;89;-1701;,(_______),(________),;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (_______);world;615;95;-1704;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (________);world;459;65;-2057;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (_______);world;460;69;-2059;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (_______);world;464;69;-2059;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Invalid blocktype for (_______);world;468;69;-2059;,;
    2011-06-22 20:23:46 [SEVERE] [ChestLock] Saving turned off to prevent loss of data
    2011-06-22 20:23:46 [INFO] ChestLock 0.9.1 is enabled!
    2011-06-22 20:23:46 [INFO] [ChestLock] Successfully linked with Permissions!
     
  9. Offline

    Codisimus

    @newyorkdaily
    it means that for some reason those data values don't link to chests, in the config you can set autodelete to true which will keep this error from coming up and instead delete the lines from the save file
     
  10. Offline

    GameFreakDude

    Suggestion - a command to quickly lock all chests that you own (and/or co-own?) would be really handy dandy!
     
    ddubois89 likes this.
  11. Offline

    Fate6900

    When ever i go to the nether it transfers all my owned chests to another player, Lucky for me i run a very small server with friends only. so my stuff is safe. Any ideas on a fix? we all pay for a server so no one person has admin powers.

    (but i can give myself admin to fix the problems)
     
  12. Offline

    manyak

    Admin cannot disown players' items withoud editing config file since admin disown tool doesnt work.
     
  13. Offline

    EpicKris

    Would like to be able to change the colour of messages.

    For example:
    Code:
    PermissionMessage=&fYou do not have permission to do that.
    Great plugin! Many thanks!

    Also, how can I disable the 'key' feature?

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

    GameFreakDude

    Psst! Got any idea what's causing this issue? Can you even reproduce it at all? :?
     
  15. Offline

    Codisimus

    In the config, set LockableDoors to false
    I'm working on it now
     
    GameFreakDude likes this.
  16. Offline

    EpicKris

    But I want to be able to lock doors but in the same way as chests so they don't use keys at all.
     
    ddubois89 likes this.
  17. Offline

    ddubois89

    +1 for @EpicKris idea. and for iron doors, I feel locking doors like chests should be the main feature with using keys as an option. Eitherway I love the plugin and simplicity of it! Thanks for the hard work for it!
     
    EpicKris likes this.
  18. Offline

    Codisimus

    UPDATE!
    Added iron door support.

    As for locking doors like chests, I am going to figure out a good way to be able to lock them either way.
     
  19. plugin just stops working for me
    and restarting do not help
    i have to del all chests and wait few minutes. it woks. and go down after sum time
     
  20. Offline

    kmccmk9

    Ok I have used this plugin before and it's been awesome! However in this latest version, every time I left click I get a message about chests? In one world I am SuperAdmin where I still get a message telling me a chest has been created, in another world without the permission I get a "You do not have permission to do that".
     
  21. Offline

    Codisimus

    What is the message exactly? and do you have conflicting tools? (like two tools both set to any?)
     
  22. Offline

    kmccmk9

    This is the only plugin I have knowledge of that locks chests. I will copy the message into here in a few minutes when I can recreate it.

    Edit: Ok, oddly with permissions it works, without permissions I get a message telling I don't have permission to do this(Giftpost.*). It's all good though
     
  23. Offline

    Gilbertamie

    Any word on when this will be updated for 953?
     
  24. Offline

    FarSideX

    I am getting the Invalid block type for all chests and furnaces when I 'reload' plugins but not when I stop/start the server. Doors work either way.

    Kicking all users just to reload plugins when I am working on other plugins is becoming quite annoying to them, so is unlocking all their chests.

    Can you take a look at this? Does it happen for everyone?
     
  25. Offline

    dm_studios

    I'm getting the same problem, it seems to overwrite the chestlock.save file everytime I reload plugins, only started happening since MC1.7

    other than that this is a great plugin my users prefer it way more than having to use commands, keep up the good work :D
     
  26. Offline

    Codisimus

    do you see any errors saying "saving turned off" or do you have it set in the config to delete invalid block type lines?
     
  27. Offline

    FarSideX

    I see 'saving turned off'. Now it is doing it only for some not all. Also quite often it stops working with no error message and after a few minutes it starts again. This happens quite often. When it stops it is like the plugin isn't even installed.

    The upgrade to 1.7 didn't change anything; I don't think that has anything to do with it as it was doing it before we upgraded.

    I'll try to find what is happening when it starts/stops, there are only 10 or so users on my server.

    BTW My users love the plugin when it works.
     
  28. Offline

    Codisimus

    you can set autodelete in the config to true to get it working again
     
  29. Offline

    FarSideX

    Doesn't autodelete delete the entries? Deleting the entries would disown/unlock the chests until the user relocked the chests, as it stands it starts working again on it own eventually. Or is this the cause of the on/off behavior?
     
  30. Offline

    Codisimus

    How many invalid blocktype errors do you get?
     
  31. Offline

    FarSideX

    Sometimes when reloading plugins it is every single chest/furnace in the file, but with a restart it fixes them, but not always.
    I am trying to find a way to repeat and recreate the situation here as it appears random when it occurs and that doesn't help in solving the issue.
     

Share This Page