ChestLock
Version 1.7.1
NOTE: This plugin requires you have Vault enabled on your server
This is a very quick and easy way to protect your Chests. No commands needed (except for advanced features)
- 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.
- 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 while holding dirt (configurable)
- admins are defined by having the permission node chestlock.admin (or isOp() if PermissionsEx is not installed)
Features:
- Supports all major Economies and Permission Plugins thanks to Vault
- You can customize what command this plugin uses by editing the plugin.yml (found inside the plugin jar file)
- MultiWorld support
- Configurable properties
- Custom messages
- Simple lock/unlock
- Quick to claim (no looking up confusing commands) Just Punch it!
- Lock Chests, Furnaces, Dispensers, Iron Doors, Wood Doors, Trap Doors, and Fence Gates
- Limit the amount of Chests/Furnaces/Dispensers/Doors Players can lock
- Configure which items unlock/own/disown
- In game tool list (/lock list tools)
- Add CoOwners who can also lock/unlock
- CoOwners can be a specific Player or a specific Permissions Group
- Make chests/doors unlockable so users can't claim them
- Doors can be locked so they can only be open using a specific key
- Hold an item and click on a Locked door to try to use that item as a key
- Players who do not log in to the server in a set amount of days will have their chests automatically disowned (optional)
Permission Nodes:
- chestlock.lock = Needed to own/lock/unlock a chest/furnace/dispenser/door (/lock)
- chestlock.usekey = Needed to open a locked door
- chestlock.list.chests = Needed to list how many chests/furnaces/dispensers you own and their locations (/lock list chests)
- chestlock.list.doors = Needed to list how many doors you own and their keys and locations (/lock list doors)
- chestlock.list.owner = Needed to see who the owner and CoOwners are of the target chest/furnace/dispenser/door (/lock list owner)
- chestlock.list.clear = Needed to disown all of your chests/furnaces/dispensers/doors (/lock list clear)
- chestlock.coowner = Needed to add a CoOwner to your chest/furnace/dispenser (/lock coowner)
- chestlock.free = Lock chests/furnaces/dispensers free of charge
- chestlock.admin = Needed to access other Players' chests/furnaces/dispensers/doors
- chestlock.limit.[type].[x] = limit the number of blocks a player can own (largest number is taken if player has more than 1 node)
- type = chest, furnace, dispencer, or door
- x = -1(no limit) or a number 0 through 100
- ex.
- chestlock.limit.chest.-1 = can own any number of chests
- chestlock.limit.furnace.23 = can own up to 23 furnaces
- chestlock.limit.dispencer.0 = cannot own any dispensers
- chestlock.limit.door.100 = can own up to 100 doors
Commands:
[] indicates a required field.
- /lock - Locks the target door with the specified Item. You then must use that type of item to open the Door. If you are not holding anything then the target Door will be set as unlockable
- /lock never - Sets the target Chest/Furnace/Dispenser as unlockable
- /lock coowner group add [Name] - Adds the specified Group as a Co-Owner of the target Door/Chest/Furnace/Dispenser
- /lock coowner group removes [Name] - Removes the specified Group as a Co-Owner of the target Door/Chest/Furnace/Dispenser
- /lock coowner player add [Name] - Adds the specified Player as a Co-Owner of the target Door/Chest/Furnace/Dispenser
- /lock coowner player add [Name] - Adds the specified Player as a Co-Owner of the target Door/Chest/Furnace/Dispenser
- /lock list tools - Lists all of the ChestLock tools that you may use to Own/Lock/etc. Chests, Furnaces, and Dispensers
- /lock list door - Lists all of the Doors that you own
- /lock list chest - Lists all of the Chests that you own
- /lock list chest - Lists all of the Furnaces that you own
- /lock list chest - Lists all of the Dispensers that you own
- /lock list owner - Lists the Owner and Co-Owners of the target Door/Chest/Furnace/Dispenser
- /lock list clear - Disowns all of your Doors, Chests, Furnaces, and Dispensers
Tutorials:
Setup:
To Lock a Chest:
- Place a chest
- Punch it - Now you are the owner and only you can lock/unlock it
- Punch it again - Now the chest is unlocked!
To Lock a Door:
- Target the door and type "/lock" - The item in your hand is set as the key
- Click on the door while holding the 'key' to open the door
Video:
Video by 0zyke
@Codisimus
Thank you very much!
Works great :)
@Next0r
I fixed this in 1.4.6 but keep in mind that the correct commands are:
22:54:43 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'lock' in plugin ChestLock v1.4.5 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715) 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:93) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457) Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at com.codisimus.plugins.chestlock.listeners.CommandListener.onCommand(CommandListener.java:124) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more
I can lock chests, doors, but when I'm trying to use any command for example: /lock never im getting this error.
@Codisimus
You fixed the problem I was having thanks again :)
@killerrabbit
it took me like 2 hours but I finally found the culprit
"adminDisown = getID(loadValue("AdminLockTool"));"
fixed in version 1.4.5
When holding sand as Admin, I can't seem to disown chests for players who have locked other players chest. Could you look into this?
Form config:
OwnTool=air LockTool=any DisownTool=dirt AdminLockTool=dirt AdminInfoTool=air AdminDisownTool=sand AdminGlobalKey=dirt
@jayman3902
I believe I have fixed this, try the Dev Build
@Codisimus
I made a new map for testing the plugin just now, and had my friend lock a door, furnace, and chest. When he was done I restarted the server and got the same error. But if im the only one locking things theres no error.
save file:
hazel1992;Server World;119;64;258;true;[];[];
hazel1992;Server World;119;64;257;true;[];[];
@TTlabambaTT
@killerrabbit
I should've made this more clear to begin with
@jayman3902
can you show my your save file?
Another issue... Everything is ok when I am locking stuff and unlocking stuff and shut down the server, but once I start the server back up it says:
[SEVERE] [ChestLock] Load failed, saving turned off to prevent loss of data
[SEVERE] java.lang.StringIndexOutOfBoundsException: String index out of range: 14
[SEVERE] at java.lang.String.substring(Unknown Source)
[SEVERE] at com.codisimus.plugins.chestlock.SaveSystem.load(SaveSystem.java:98)
[SEVERE] at com.codisimus.plugins.chestlock.ChestLock.onEnable(ChestLock.java:65)
[SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
[SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
[SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
[SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
[SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
[SEVERE] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
[SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
[SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
[SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
[SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
Once again any help with this would be very apreciated :) And any information you need I can give.
@Codisimus
Ah... Major facepalm sorry to waste your time
@Codisimus
Ah sorry Codisimus, I understood something like that this "Vault" you spoke of was something you integrated it into your plugin, did never understand it was a dependency, since I had not heard about it before either! Thanks - I will try to download Vault then as well and hopefully it will work then!
@Codisimus
Thanks for your quick fix :)
@jayman3902
no need, I fixed it in version 1.4.4
@Codisimus
I dont have any economy plugins. Should I just revert back to an earlier chestlock version, or should it matter?
@jayman3902
what are you using as your economy?
Im running 1.4.3, and I have the vault, but when I try to lock everything but doors I get this error:
2011-12-12 20:14:06 [SEVERE] Could not pass event PLAYER_INTERACT to ChestLock java.lang.NullPointerException at com.codisimus.plugins.chestlock.listeners.PlayerEventListener.onPlayerInteract(PlayerEventListener.java:156) at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:335) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339) at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178) at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:498) at net.minecraft.server.Packet14BlockDig.a(SourceFile:43) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
But locking doors works perfectly fine. Any help with this would be much apreciated.
@Ripptor
@TTlabambaTT
@killerrabbit
This error means that you don't have Vault enabled. This plugin now requires Vault to run which can be found at http://dev.bukkit.org/server-mods/vault/
Don't worry this is simple to install, just place it in your plugin folder (like you would with any other plugin) and it will automatically linked my plugin to whichever economy/permission plugins you have. I would have explained this more but I thought more ppl were familiar with Vault.
@RamTamSpecial
I'm not sure what the problem could be with yours, I'll have to test it after finals.
Same issue as killerrabbit and TTlabambaTT, Unknown Dependency Exception: Vault.
Hope this gets fixed soon! You do great work!
EDIT: 1.4.1 works for me still, so I'll continue to use that until the next update!
I have the exact same problem as killerrabbit http://pastebin.com/XAF4CkNd (chestlock version 1.4.3)(CB version 1585). It isn't even loading the chestlock folder. I have used this mod alot and for a long time it is by far and away the best chest locking mod to date easy to use and understand yet very powerful. Hope this gets fixed soon good luck! :) :) :) :)