[INACTIVE][MISC] HeroLock 0.0.4 - Password Protected Chests [670]

Discussion in 'Inactive/Unsupported Plugins' started by RightLegRed, Apr 3, 2011.

  1. Offline

    Archelaus

    HeroLock
    Downloads
    0.0.4 | 0.0.3 | 0.0.2 | 0.0.1 | source
    What is it?
    HeroLock is a plugin by the Herocraft Development Team. It uses the functionality of the new built-in persistence system that is provided by Bukkit to ensure that the locked chest stay locked. It allows users to quickly lock and unlock chests.
    How do I install it?
    To install HeroLock all you need to do is drop the jar file into your plugins folder. Then start up your server. HeroLock creates a folder entitled "HeroLock" inside your plugins folder. Inside this folder, is the database file. Which is a SQLite3 database file. This file is vital to the plugin. This is where the chest locations and passwords are stored. Deleting this file would mean that all of your chest that have been locked will be lost.
    How do I use it?
    Using HeroLock is simple. It consists of three commands currently. The first of which is lock. This command locks a chest with the password specified after the command. To use this, you activate the command and then right click on a chest. This will lock the chest if the chest isn't already locked. All of HeroLock's commands have 1 argument. Which is simply the password you wish to assign to the chest.
    The second command that HeroLock showcases is the unlock. Unlock is locks sister command. After you have locked a chest you simply need to use this command to use this as your unlock key. After saying this command, you can unlock any chest with the same password. Simply use the command unlock and then attempt to open a chest. If you get it right, the inventory window for that chest will open. If you get it wrong, then the window won't open and you'll be given a message saying that the password is incorrect.
    The final command that HeroLock has is change. This command is quite simple. It allows you to change the password of a chest. This is basically lock, but allows you to change the password. Only the owner can change the password. Please note, it doesn't require you to use the current password to change it. To use this command, do the command change followed by the new password. After doing this, right click on a chest. It'll give you a message if it was successful.
    What will it be able to do?

    In the future I plan to add more functionality. I plan to add change in a way that lets anyone who has the password change it. My next plan would be to add modes. Much like an IRC channel, you could set a mode of a chest to react in a certain way to a player. Like if you were to set it to -p, it wouldn't be private and anyone could see inside, reguardless of using unlock or not.
    Does it have permissions support?
    Yes, HeroLock does. The permissions nodes are:
    herolock.chest.lock - to allow the user to lock chests
    herolock.chest.unlock - allow the user to unlock chests
    herolock.chest.change - allow the user to change a chests password.
    Whats been changed?

    0.0.1 - I've just finished the basic features of the plugin. This is the initial release and feedback period.
    0.0.2 - Bug fix for the database system.
    0.0.3 - Implemented permissions support and new recommended build [670]
    0.0.4 - Fixed the above permissions support.
    Other staff members - I do not expect for this plugin to be brought into releases or I would've done it myself. I am simply posting to showcase the plugin and gather feedback. The plugin builds against a non-rb build which means it cannot be released.

     
  2. Offline

    Kainzo

    *Hero-Stamp of approval!*
     
  3. Offline

    tekac

    can you add owners?
     
  4. Offline

    BigBrain74

    gana try it out in my server and ill give you some feedback, I have been lookign fora good lock mod that wont be disrupted by runecraft or other mods. Lets hope this works!
     
  5. Offline

    Archelaus

    What do you mean by "add owners"? If you mean people who can change the password, then not at the moment. Perhaps in the future.

    Thanks. Feedback is appreciated. It's a simple setup.
     
  6. Offline

    Plague

    Shouldn't moderators be a role model for other plugin developers and format the post according to the guidelines? ;)
     
  7. Offline

    Major

    What doesn't he have?
    His title is correct, the topic has the version, build and a description, it has the features and a changelog, and what it will do in the future (which isn't required).

    OT: Pretty nice plugin, I like it :)
    Can OP's open all chests (I assume there is no permissions support, that would be nice too ;))?
     
  8. Offline

    Archelaus

    Permissions was added but taken away. It caused bugs but will be added again.
     
  9. Offline

    BigBrain74

    Isnt working
     
  10. Offline

    Archelaus

    Very helpful. Mind posting why it doesn't work and logs? Please provide the following:


    What specifically doesn't work:
    What build you're on:
    Operating System:

    Also a heads up -

    During the development of this plugin, each time I would export into the jar the db would fail. I would have to wipe the db and start again. While I'm not 100% sure what caused this, as it's bukkit persistence, I will be including an exporter and importer. Which allow you to export your db and then import it back. Apologies for this, but is isn't my fault. I'm doing nothing wrong AFAIK.

    Also, Permissions today (Dated - 06 April 2011 - 03:50am)
     
  11. Offline

    Seox

    Is it possible to allow the locking of levers? Would rather not have people spamming 'cullis gates in our main city.
     
  12. Offline

    eryc

    Hey,
    I like the purpose of this plugin, but it's not working.

    I'm running a minecraft server at a CentOS 5 Linux Server, with minecraft server version 1.4 and Bukkit build 612.
    When i'm starting the server, i get this error:

    Code:
    20:12:10 [SEVERE] Could not load plugins/HeroLock.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:105)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:97)
        ... 8 more
    Caused by: java.lang.ClassNotFoundException: javax.persistence.PersistenceException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
        ... 11 more
    So, this means that the plugin is not loaded properly.

    My line with version information:
    Code:
    Craftbukkit version git-Bukkit-0.0.0-612-g4c7a9e7-b617jnks (MC: 1.4)
    I hope i've provided enough information for you,
    and thanks for your help in advance.
     
  13. Offline

    Sefragus129

    CAN you destroy the chest if its you don't have the password?
     
  14. Offline

    Archelaus

    It is possible. I will implement that now.



    This plugin is built against a non-rb craftbukkit. It won't work with your craftbukkit. Either wait for the new one or upgrade to a non-rb one now.


    No, you cannot.

    Fixed the bug. Now you can update without bugs! Sorry for no permissions support. I got lazy, I'll admit it. I've got another huge project underway with the rest of the Herocraft team though ;)

    Oh right yeah, 0.0.2

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

    phaed

    Very interested to know about "the new built-in persistence system that is provided by Bukkit" perused your code but was not able to find anything like this >.>
     
  16. Offline

    Archelaus


    Look at the "PlayerListener" class. I'll be glad to help if you need it. I'm on IRC in the #bukkitdev and #bukkit channels. Failing that, inbox me with questions and I'll help. I've forgotten to edit the thread title, but version 0.0.2 is out.

    Version 0.1.0 will contain permissions and hopefully locked doors.
     
  17. Offline

    phaed

    :O getDatabase(). Didn't realize it was a bukkit method on first look.

    Edit: The Java Persistence API is now included with bukkit. Could have just told me that. Thanks tho.
     
  18. Offline

    Archelaus

    That's exactly what I said "the new built-in persistence system that is provided by Bukkit".
     
  19. Offline

    phaed

    One is specific and can be googled, the other is an allusion which could be a number of things. I actually thought for a second that we could now store data in the blocks themselves. Regardless, great example of its use in your code. Thanks for that.
     
  20. Offline

    DThielke

    It actually uses Ebeans, something different from JPA.
     
  21. Offline

    Ninja

    does this work with beta 1.4
     
  22. Offline

    EPICwin1000

    Where can I find the plugin folder? Plz respond, EPICwin1000

    [cake][obsidian][bedrock] Thatsssss a nick cake you got there! ;) - [creeper]
     
  23. Offline

    Archelaus

    What do you mean? It's literally called "plugins"



    Also, 0.0.3 is now out.
     
  24. Offline

    marcram

    If I try to lock a chest there is an error and then this appers in the server console.

    Im Using the newest Bukkit version 670

    Code:
    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'lock' in plugin HeroLock v0.0.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:254)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:596)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
        at com.herocraftonline.rightlegred.herolock.commands.CommandChestLock.onCommand(CommandChestLock.java:29)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    Caused by: java.lang.ClassNotFoundException: com.nijiko.permissions.PermissionHandler
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 14 more
     
  25. Offline

    TheCubeMaster

    Running 612
    19:30:37 [SEVERE] Could not load plugins/HeroLock.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:105)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:97)
    ... 8 more
    Caused by: java.lang.ClassNotFoundException: javax.persistence.PersistenceException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 11 more
     
  26. Offline

    Archelaus

    I know what's causing this. I'll fix it ASAP.



    You need to use 670.
     
  27. Offline

    Avous

    i got cb 670 and no real bugs but theres a problem... none of my members can use double chests because they have to lock BOTH with a password of a chest.

    meaning basically if they forget to lock one side the thief can just go to the other and look to their hearts content... please help
     
  28. Offline

    Archelaus

    This is a problem I discovered. Originally it did support double chests, but somehow I had deleted the support for that. Will do that now, apologies.
     
  29. Offline

    gael

    is that normal that my players can open any chest with any code,
    even if they don't have placed it and don't used the good code?
     
  30. Offline

    Archelaus

    That makes little sense, please explain further
     

Share This Page