[Inactive] [SEC/MECH] LockChest v5 - Chest Lock/Pick [803]

Discussion in 'Inactive/Unsupported Plugins' started by DeathCradle, May 6, 2011.

  1. Offline

    DeathCradle

    LockChest - Chest Locking & Picking:
    Build: 5
    Tested Bukkit Build: 803
    Permissions Support: Yes! (Partially)
    MultiWorld Support: Yes!

    This plugin allows a player to select a chest and lock it's contents from other players and even being broken. The other functionality within this allows players to 'pick' a Locked Chest.

    b4 fixes some sort of chest bug when placing chests on water, snow or similar; Allowing for Multiple/Stackable Chests in a line.

    Usage:
    To utilise this you will need to use the commands:
    • /lockchest enable
    • /lockchest disable
    • /lockchest lock (Automatically add the selecting player to the lock)
    • /lockchest lock [extra players] (E.g. /lockchest lock player1,player2)
    • /lockchest unlock
    • /lockchest current (Displays current selected Chest)
    • /lockchest adduser [extra players]
    • /lockchest removeuser [extra players]
    Want to see this Plugin in Action?

    Since this plugin was made for Olympus Minecraft you can come over and join the community and check out this plugin!
    IP Address: login.olympus-mc.net

    Installation:
    To setup this plugin, You need to be running some sort of Permissions/GroupManager type plugin, Then just simply use the in-game commands.

    Command Information:
    • enable - After using this command, Click the Chest with nothing in your hand! to select it
    • disable - Deselects the current Chest.
    • lock - Locks the Chest
    • unlock - Unlocks a selected Chest (If you have access to it)
    • current - Shows the location of the currently selected Chest
    • adduser - Adds user(s) to a selected accessible Chest
    • removeuser - Removes users(s) from a selected accessible Chest
    How to 'Lock Pick' a Chest?:

    To lock pick a chest you simply need to use a hoe. Each hoe has a different success rate;
    Wooden -> Diamond, Wooden of course, easiest to obtain, hardest to use. Diamond has a success rate of around 5-7 times on average.
    CAUTION: Each time you use a Hoe to attemp to gain access to a chest, You WILL loose it.

    Features:
    • Allows you to Lock Chests
    • Pickable Chests
    • UnBreakable Chests
    • Toggable Picking
    • Custon Items as Pick
    • Permissions Support (See Nodes below)
    Permission Nodes:
    • lockchest.break (allows people to break chests)
    • lockchest.enable
    • lockchest.disable
    • lockchest.lock
    • lockchest.unlock
    • lockchest.adduser
    • lockchest.removeuser
    • lockchest.current
    • lockchest.pick
    Configuration:
    • allowops - Allows ops overall access to chest
    • allowpicking - Allows Picking of Chests
    • The rest are the id's of Items for Picks.
    Download:

    Code:
    http://downloads.craftmin.com/LockChest.jar
    Changelog:
    Code:
    Build: 5
     * Added lockchest.pick
    Build: 4
     * Fixed: Chest Bug?
    Build: 3
     * Added MultiWorld
     * Configurable Success Rates
    Build: 2
     * Added more configuration, fixes and nodes
     * Built for #766
    Build: 1
     * Initial Release
    
     
    MuttsNuts, Lobster and kahlilnc like this.
  2. Offline

    DaveDee

    still no lockchest.pick ?
    Waiting only for it...
     
  3. Offline

    MuttsNuts


    I would love to use this plugin but I'm getting an error (shown below) in the console at server startup and I'm guessing it has something to do with the empty configuration file (0KB) in the LockChest folder. Any commands I type related to the plugin for example /help LockChest just gives me an error basically saying the plugin is broke :(. I also noticed essentials in the error message so removed it (it is essential I have essentials though) but still not working.

    ERROR:

    HTML:
    2011-05-21 11:06:22 [SEVERE] com.craftmin.bukkit.Settings.setAllowPicking(Z)V loading LockChest v4 (Is it up to date?)
    
    java.lang.NoSuchMethodError: com.craftmin.bukkit.Settings.setAllowPicking(Z)V
    
        at com.craftmin.bukkit.LockChest.onEnable(LockChest.java:73)
    
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:676)
    
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:249)
    
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:336)
    
        at com.earth2me.essentials.commands.Commandplugin.run(Commandplugin.java:50)
    
        at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:50)
    
        at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:45)
    
        at com.earth2me.essentials.Essentials.onCommand(Essentials.java:569)
    
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
    
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
    
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    2011-05-21 11:06:22 [SEVERE] com.craftmin.bukkit.Settings.setAllowPicking(Z)V loading LockChest v1 (Is it up to date?)
    
    java.lang.NoSuchMethodError: com.craftmin.bukkit.Settings.setAllowPicking(Z)V
    
        at com.craftmin.bukkit.LockChest.onEnable(LockChest.java:73)
    
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:676)
    
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:249)
    
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:336)
    
        at com.earth2me.essentials.commands.Commandplugin.run(Commandplugin.java:50)
    
        at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:50)
    
        at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:45)
    
        at com.earth2me.essentials.Essentials.onCommand(Essentials.java:569)
    
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
    
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
    
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    


    If you have any suggestions on this It'd be much appreciated.

    If you need any more info please ask.

    Thanks.
     
  4. Could you possibly rewrite this as a LWC add-on when LWC v3 is released? I'm guessing that that will make it easy to add a lot more functionality, and it would make this a lot more popular.
     
    Nazerb likes this.
  5. Offline

    Garnith

    Seconding the request for "lockchest.pick" node. I've chucked this on the server, but I really only want my Rogues able to pick locks, rather than anyone being able to.
     
  6. Offline

    DeathCradle

  7. Offline

    BioRage

    Could you integrate iConomyChestShop?
    LWC has an auto lock feature when you create a store, if you do I'm sold! that lock picking sounds amazing.
     
  8. Offline

    DeathCradle

    Ill have to look into it, I have no idea how it works or what it is/does at the moment :p
     
  9. Offline

    Lehran

    Sorry for sounding noobish, but could you explain the lockchest.break permission a bit more? Will this prevent them from breaking all chests or just locked ones, and is the chest owner exempted from said restriction?

    i.e. let's say everyone on my server was given 'lockchest.*' for permissions. When I make a chest and lock it, will other people be able to break my chest? If not, will I be able to break my own chest without unlocking it first? I can't really test this myself since I'm the only user on my test server

    Also, I noticed in the config file there are numbers for the success rates of picks, can you explain what these numbers actually mean in more depth (the stonerate/ironrate/diamondrate/woodrate/baserate options in the config). Does diamondrate being 20 and baserate being 40 mean that diamond picks have a 50% chance of succeeding (20/40 = 0.5)?

    Just wanted to get some more info before enabling this plugin on my public server, otherwise it sounds sweet (I really like the whole lock-picking idea)
     
  10. Offline

    MuttsNuts

    I am still having the same issues with v5 sadly.
    Any luck with finding a fix @DeathCradle?
    Would really love to use this as its the only plugin that allows chests to be picked:D.
    Thanks much.
     
  11. Offline

    DeathCradle

    I havent seen it the past few days, But when it happens seems to stiill work fine for us :confused:
    Definalty wanting to resolve it though.

    @Lehran lockchest.break allows the given user to break a locked chest, recommended for OPs or higher ranks.

    Basically all those settings allow you to fine tune the success rates. The base rate is the main rate (thus base rate, always used if the hoe's rate is above 0 :p). The other rates are for the hoe's which are then taken from the base rate, They then are picked with a random number betweeon 0 and the calculated number of what was produced by taking the hoe's rate from the base rate. If that output is smaller than the original hoe's rate it is then added ionto the hoe's original rate.
    Then if the that rate was equal to the hoe's rate it will mean the chest was picked, Else, it will fail.
    There is also another check for diamond, as diamond is more valuable it will help keep the success's to around 5-7 times (average). This is done by seeing if they've failed more than five times & using a diamond hoe, then gets a random number from 0 - 2, and if it equals 1 sets it to be unlocked otherwise it would leave the diamond hoe too, toooo hard to use and not even worth using it.

    So modifying the base rate will change all the rates, but modifying the rate of a hoe will modify it for that one only.

    (If that helps at all lol, Not sure if thats the explaination you were after but hay, i hope it helps. :p)
     
  12. Offline

    Lehran

    It kinda helps, although I'm still lost as to what you're actually trying to do. Here's how I'm interpreting this so far:
    1. Take a random number between 0 and Base Rate - Original Hoe Rate
    2. If that random number is < Original Hoe Rate, New Hoe Rate = Original Hoe Rate + that random number (otherwise New Hoe Rate = Original Hoe Rate)
    3. ??? (I'm reading this as if New Hoe Rate = Base Rate - Original Hoe Rate, then it gets picked, which doesn't really make sense as it means any rate < 14 would mean it's impossible to pick with that with the default config)

    I'd look through your source code to figure it out, but you don't have it anywhere. Can you post the code snippet that calculates success vs. failure?
     
  13. Offline

    DeathCradle

    I think it's easier to point the source to you, I'm hopelesss when it comes to explaining. :p
    Over Heerrrreee
     
  14. Offline

    Lehran

    Thanks, that helps a lot, and that is a REALLY messed-up system of doing this.

    For those that are wondering, when changed to percentages, here's what you can expect with default configs (baserate 40):
    Wood (rate 1): 5.13%
    Stone (rate 5): 5.71%
    Gold (rate 7): 6.06%
    Iron (rate 8): 6.25%
    Diamond (rate 20): 10.00% (where you have had 0-4 failures in a row with diamond), 33.33% (where you have 5+ failures in a row with diamond)

    Formula:
    Success = 2 / (Base Rate - Hoe Rate), where Hoe Rate <= Base Rate / 2
    Success = 1 / (Base Rate - Hoe Rate), where Hoe Rate > Base Rate / 2 and Hoe Rate < Base Rate

    @DeathCradle, a much easier (and more understandable) way of doing these would be straight-up ratios, as your current method provides distributions right around a target number with no easy way to deviate from that number by a significant margin.

    e.g. http://pastebin.com/qh6Mdfyr. With that code, you take a number from 0 to baserate, then if that number is less than chance, it unlocks. So, when baserate is 100, and diamond hoes are 20, diamond hoes have a 20 / 100 = 20% chance of success (or when the rate is 30, a 30% chance, and so on). That code I pasted also removed the special case for diamonds since if you want something to succeed roughly every 5 times, then simply set it to 20% as that's a 1/5 chance of succeeding.
     
  15. Offline

    DeathCradle

    It was just random code i did up before it was a decided plugin, It worked, they liked it; So hay, there it is. But yeh I have to agree with the Messy part, Not entirely proud of it, So i may add yours, If i get time. Thanks
     
  16. Offline

    Nazerb

    work with 818? I don't know if it would be possible but could you cut out commands and just have it so you hit a chest to own, then hit again to toggle the lock. I dont like commands for real-world applications, if you get what i mean.
     
  17. Offline

    Lynxdragon

    So does the Hoe break on first failed attempt to lock pick, or does it just subtract from its durability until it breaks? Eg. Diamond loses 1/4 of its durability on each fail?

    Can you please update for 818. :)

    Thanks for your time.
     
  18. Offline

    Lehran

    @Lynxdragon, it breaks on the first attempt, no matter what the starting durability was or what the hoe is made out of. The material of the hoe only affects the success rate, although not by a whole lot (see my above post). Seems like a great feature request though :)

    EDIT: I see you say failed attempt, but it doesn't actually matter. It'll break even if it succeeds
     
  19. Offline

    silentjubjub

    Any ETA on when this will be updated? I really want it for my server and refuse to open it to the public until then. :cool:
     
  20. Offline

    Ilikecookies42

    I changed allowpicking: true to allowpicking: false, but still anyone is able to pick those chests with a diamond hoe.

    [edit]: On the first try and it doesn't break at all.

    Why?
     
  21. Offline

    DeathCradle

    I've just recovered from a OS issue. I'm trying to recover data from other plugins not on github, and get our server back up with updated plugins too, As Or sponsor decided to take ALL our data...So we're screwed.

    SO my plugins shouldnt be much longer, i hope..
     
  22. Offline

    Dagumboss

    How about MultiVerse support instead of MultiWorld, or both if possible. I use portals to move between worlds in my server, and now LockChest doesn't work in the main world. Only in 'world' world.
     
  23. Offline

    ButtChew

    There needs to be a way to check if your own chests are locked. Maybe a "Chest is already locked!" if you try to /lockchest lock one or something.
     
  24. Offline

    Rellac

    Any chance of this supporting doors?

    I love your lockpicking methods, and it would be amazing to have the feature alongside doors.
     
  25. Offline

    DaveDee

    Best lockpicking plugin... hope someone will ressurect it.
     
  26. Offline

    ColaBoy42

    Download doesn't work. Its in code format and when pasted it just 404's.
     
  27. Offline

    Proxxy56

    Hey mate i have a prob do i need other plugins to do that






    java.lang.ClassNotFoundException: ChestLock


    at java.net.URLClassLoader$1.run(Unknown Source)


    at java.security.AccessController.doPrivileged(Native Method)


    at java.net.URLClassLoader.findClass(Unknown Source)


    at java.lang.ClassLoader.loadClass(Unknown Source)


    at java.lang.ClassLoader.loadClass(Unknown Source)


    at PluginLoader.load(PluginLoader.java:457)


    at PluginLoader.loadPlugin(PluginLoader.java:413)


    at PluginLoader.loadPlugins(PluginLoader.java:379)


    at OChunkProviderServer.a(OChunkProviderServer.java:168)


    at OWorld.a(OWorld.java:181)


    at OWorld.g(OWorld.java:1531)


    at net.minecraft.server.MinecraftServer.h(SourceFile:366)


    at net.minecraft.server.MinecraftServer.run(SourceFile:302)


    at OThreadServerApplication.run(SourceFile:417)


    2011-10-03 15:18:36 [SEVERE] Failed to find plugin file: plugins/SimpleChestLock


    .jar. Please ensure the file exists






     
  28. Offline

    MuttsNuts

    This plugin is severly out of date hence the error you're getting. Until somebody comes along and resurrects this sadly its not going to work.
     
  29. Offline

    moparisthebest

    But no one can 'resurrect' it, since the author never made it open-source.
     
  30. Offline

    MuttsNuts

    You are correct there. If I find a few more coders to join "mCraft Coding", a very similar plugin will be developed but unfortunately finding coders seems a difficult task.
    mCraft Coding have 1 dev on board atm and I'm actually starting to learn myself as well as my girlfriend so fingers crossed we may be able to knock something up.
    As this was a major part in my own server setup and it is no longer available I will certainly be trying my hardest to develop something similar.
    May not be any time soon sadly :(
     

Share This Page