[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

    Nick_Carriere

    When I lock a door it doesn't save to the files and whenever i turn off my server then start it back up the locked door no longer is locked.

    That is the log from startup to trying to lock a door.
     
  3. Offline

    785412

    Hi! I have a some problem:
    When im clicking on the chest, server writing to me "The chest now belongs to you."
    ok, all working (no errors in server log). BUT when i restart my server, chest is NOT belong to me. Im looking directory "ChestLock\chestlock.save" - 0 byte.
    Sorry for my english.
    fix it or help me, please!
    Before when im trying to lock my door server output me errors.
     
  4. Offline

    hitandrun

    i might have configured something wrong, but all my locked chests and doors can be opened when air or an item (stick, gunpowder, door) is held in the hand. Is there anything i should change in config (default atm) or is it working as intended
     
  5. Offline

    jal238

    It doesn't work for me - it just says something like: "console does not recognise this comand" when i type "/lock" and when i punch a chest - nothing happens! Any advice?
     
  6. Offline

    Viliasas

    Code:
    148 recipes
    16 achievements
    18:08:18 [INFO] Starting minecraft server version Beta 1.6.6
    18:08:18 [INFO] Loading properties
    18:08:18 [INFO] Starting Minecraft server on *:25565
    18:08:18 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    18:08:18 [WARNING] The server will make no attempt to authenticate usernames. Be
    ware.
    18:08:18 [WARNING] While this makes the game possible to play without internet a
    ccess, it also opens up the ability for hackers to connect with any username the
    y choose.
    18:08:18 [WARNING] To change this, set "online-mode" to "true" in the server.set
    tings file.
    18:08:18 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-766-
    g3fc0460-b818jnks (MC: 1.6.6)
    18:08:18 [INFO] Preparing level "Viliasas"
    18:08:18 [INFO] Preparing start region for level 0
    18:08:19 [INFO] Preparing start region for level 1
    18:08:19 [INFO] Preparing spawn area: 16%
    18:08:20 [SEVERE] ebean.properties not found
    18:08:20 [INFO] DataSourcePool [TimeShift] autoCommit[false] transIsolation[SERI
    ALIZABLE] min[2] max[20]
    18:08:20 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.Plugi
    nClassLoader]
    18:08:20 [INFO] Entities enhanced[0] subclassed[1]
    18:08:20 [SEVERE] Error occurred while enabling ChestLock v0.8.4 (Is it up to da
    te?): null
    java.lang.NumberFormatException: null
            at java.lang.Integer.parseInt(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at ChestLock.ChestLock.loadConfig(ChestLock.java:169)
            at ChestLock.ChestLock.onEnable(ChestLock.java:55)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:750)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:253)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    18:08:20 [INFO] [Cloth] Cloth 0.1 enabled successfully.
    18:08:20 [INFO] Elevators version 1.4.3 is enabled! 1 elevator in worlds "Vilias
    as", "Viliasas_nether" loaded.
    18:08:20 [INFO] [LoginMessage] 0.6.61 enabled
    18:08:20 [INFO] [LoginMessage] Attempting to fill in local fields...
    18:08:20 [INFO] [LoginMessage] Unable to fill in local fields.
    18:08:20 [INFO] NaturalGiants version 1.3 is enabled!
    18:08:20 [INFO] RegionalWeather v0.4.5 enabled.
    18:08:20 [INFO] SpawnCreature is on!
    18:08:21 [INFO] TimeShift version 2.0.1 is enabled!
    18:08:21 [INFO] Done (0,266s)! For help, type "help" or "?"
    >
    This also doesn't work for me.
     
  7. Offline

    ghostsoldier23

    Come on man this plugin isn't working. And I really want it to! It's so good!
     
  8. Offline

    dakzerox

    Error occurred while enabling ChestLock v0.8.4 (Is it up to date?): com/nijikokun/register/payment/Methods
    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:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
     
    ghostsoldier23 likes this.
  9. Offline

    ghostsoldier23

    Yup.
     
  10. Offline

    Codisimus

  11. Offline

    sfxworks

    Thank you very much for making this. Doors really help.
     
  12. Offline

    D4RKN355

    for me it doesnt work is say unknown command help anyone ?
     
  13. Offline

    Codisimus

  14. Offline

    AndyBay

    I can't open my chest anymore, and when I restart the server the chests have no owner anymore.
     
  15. Offline

    Codisimus

    can I see your config file and are there any errors in console?
     
  16. Offline

    AndyBay

    Code:
    #Config file for ChestLock
    #Plugin made by Codisimus
     
    #If set to true, lines with Invalid Block Type errors will
    #be automatically deleted (Saving will not be turned off)
    
    AutoDelete=false
     
    #Supported Economy plugins:
    #BOSEconomy, iConomy (4 or 5), Essentials, None
    #If you set the CostToOwn, make sure you
    #include <price> somewhere in the OwnMessage
    
    Economy=none
    CostToOwn=0
     
    #If set to true, users can own/lock that type of block
    
    LockableDoors=true
    LockableChests=true
    LockableFurnaces=true
    LockableDispenser=true
     
    #If set to true, owned blocks cannot be destroyed by explosions
    
    ExplosionProtection=true
     
    #The tools are the items that must be in your hand to do the action
    #air = empty hand, any = can be holkding anything (or nothing)
    
    OwnTool=air
    LockTool=any
    DisownTool=dirt
    AdminLockTool=dirt
    AdminInfoTool=air
    AdminDisownTool=sand
    AdminGlobalKey=dirt
     
    #These are the messages that players will see while using ChestLock
    
    PermissionMessage=You do not have permission to do that
    OwnMessage=This <blocktype> now belongs to you
    LockMessage=<blocktype> is now locked
    LockedMessage=That <blocktype> is locked
    UnlockMessage=<blocktype> is now unlocked
    DisownMessage=You disowned the <blocktype>\!
    DoNotOwnMessage=That <blocktype> does not belong to you
    KeySetMessage=Key to open door set to <iteminhand>
    InvalidKeyMessage=That is not the key required to open this door\!
    UnlockableMessage=<blocktype> is now unlockable
    LockableMessage=<blocktype> is no longer unlockable
    InsufficientFundsMessage=You need <price> coins to own a <blocktype>\!
    I don't get any errors.
     
  17. Offline

    Nick_Carriere

    Still having issues. Tried deleting the plugin file. Tried running with no other plugins. Nothing. Once again, here is what i get from start of my server to when I try to lock a door.
     

    Attached Files:

  18. Offline

    Codisimus

    I have no idea, It works perfect on my server. can you post your save file? or perhaps I can log onto your server
     
  19. Offline

    Viliasas

    The plugin now starts normaly and it seems like it works. But for some reason it doesn't know who's the owner of certain objects. For eg. i try to open my chest it says that it's locked and when i try to open it - nothing happens. As admin i try to punch it with air to know who owns it, and it doesn't give me a name (nothing happens). Due to this i think that your plugin reads owner names wrong or something, as it still know which items are locked.

    Here's my chestlock.save (and plugin config is plugin generated):
    Code:
    Viliasas;Viliasas;7;71;85;,;
    
    Viliasas;Viliasas;2;71;80;,;
    
    Mindaugas;Viliasas;20;68;121;,;
    
    Mindaugas;Viliasas;19;68;125;,;
    
    Mindaugas;Viliasas;15;68;125;,;
    
    Player;Viliasas;-42;72;74;,;
    
    Viliasas;Viliasas;0;71;88;,;
    
    Player;Viliasas;-46;72;73;,;
    
    Player;Viliasas;-44;72;73;,;
    
    Player;Viliasas;-44;72;76;,;
    
    Viliasas;Viliasas;-2;71;88;,;
    
    Player;Viliasas;-46;72;84;,;
    
    Player;Viliasas;-42;72;76;,;
    
    Player;Viliasas;-34;73;69;,;
    
    Viliasas;Viliasas;-16;72;78;,;
    
    Viliasas;Viliasas;-21;72;84;,;
    
    Player;Viliasas;-51;83;114;,;
    
    Player;Viliasas;-51;83;116;,;
    
    Player;Viliasas;30;71;43;,;
    
    Mindaugas;Viliasas;104;72;-4;,;
    
    Mindaugas;Viliasas;109;73;-4;,;
    
    Mindaugas;Viliasas;40;82;98;,;
    
    Erika;Viliasas;127;71;2;,;
    
    Viliasas;Viliasas;6;71;89;,;
    
    Viliasas;Viliasas;2;71;89;,;
    
    Viliasas;Viliasas;7;71;86;,;
    
    Viliasas;Viliasas;-13;72;82;,;
    
    Viliasas;Viliasas;-13;72;83;,;
    
    Viliasas;Viliasas;-13;72;84;,;
    
    Viliasas;Viliasas;53;72;193;,;
    
    Viliasas;Viliasas;72;63;219;,;
    
    Viliasas;Viliasas;71;63;216;,;
    
    Viliasas;Viliasas;69;63;216;,;
    
    Viliasas;Viliasas;68;63;219;,;
    
    Viliasas;Viliasas;-6;73;88;0;
    
    Viliasas;Viliasas;8;72;87;0;
    
    Viliasas;Viliasas;8;72;88;0;
    
    Viliasas;Viliasas;6;72;83;0;
    
    Viliasas;Viliasas;-18;72;88;81;
    
    Viliasas;Viliasas;-17;72;88;81;
    
    Milicija;Viliasas;-89;95;201;352;
     
  20. Offline

    Nick_Carriere

    You can log into my server, its nickcarriere.chickenkiller.com I dont know your username so i cant make you be able to build or really do anything other than walk and fly around.
     
  21. Offline

    Rashaln

    I also have severe issues with ChestLock currently. Chests cannot be unlocked after claiming ownership, and before testing, ChestLock would not save properly. When I tested, by removing and individually replacing plugins, this morning, the saving issue did not re-appear. It had been wiping the save file clean when the server shut down.(Tested by placing a working save file in the ChestLock folder.)

    Was running 0.8.1 on Minecraft 1.5_02 Bukkit 766 with no issue, updated to 0.8.4 with Minecraft 1.6.6 and Bukkit 818 and the save file started being wiped, and then 0.9 with Minecraft 1.6.6 and Bukkit 860, save file wiped and unable to unlock chests. Absolutely no errors show in the log, loads fine.

    When the save issue persisted, generating a new save would not fix the issue, the plugin still wiped/did not write information to the file. (That appears to be fixed in 0.9, but testing is sparse.)

    I'm running a server with MineOS+ installed. After testing, I cannot find a plugin conflict causing this issue. Chests cannot be unlocked with a fresh or modified config.
     
  22. Offline

    Codisimus

    my IGN is Codisimus
     
  23. Offline

    ghostsoldier23

    I don't get any errors.

    Using the default config file and I am having the same problem. Can't unlock/lock chests, furnaces or dispensers.
     
  24. Offline

    Codisimus

    @Viliasas
    @Nick_Carriere
    @Rashaln
    Before I push the update try this test jar, It should fix the unlocking issues (the saving issues may be related)
    https://sites.google.com/site/codys.../testplugins/ChestLock.jar?attredirects=0&d=1

    ^

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

    Viliasas

    Don't see this test jar you mentioned :\ Or i'm just too late?
     
  26. Offline

    Codisimus

    sorry I added it above
     
  27. Offline

    Viliasas

    Just tested - nothing changed. Still can't open previously locked chests with punch... It seems that this works for people who use new save file :| Maybe i should just create new...
     
  28. Offline

    Codisimus

    im currently testing this as well
     
  29. Offline

    AndyBay

  30. Could you please add WorldGuard Support?
    S0 players can only lock something in their region?

    That would be nice :D
     
  31. Offline

    Nick_Carriere

    Same issue, im gonna backup my world and try a new world. This world is really old. You can log into my server now.
     

Share This Page