[INACTIVE][GEN] OChestDump v1.10 - Quickly stash, loot, or sort inventory [677]

Discussion in 'Inactive/Unsupported Plugins' started by Nayruden, Jan 25, 2011.

  1. Offline

    Nayruden

    OChestDump - Quickly stash or loot inventory:
    Version: v1.10
    Download: https://github.com/downloads/Nayruden/ocd/OChestDump.jar
    Source: https://github.com/Nayruden/ocd
    Bugs/Requests: https://github.com/Nayruden/ocd/issues

    OChestDump allows you to dump the contents of your inventory to a container, or to dump the contents of a container into your inventory, or to swap the contents of a container with your inventory, or to sort a container.

    To use, type "/ocd swap", "/ocd loot", "/ocd stash", or "/ocd sort" in chat while looking at a chest or dispenser. Typing "/ocd" in chat will bring up the help for the command.

    Loot fits as many items from the container into your inventory as possible.
    Stash fits as many items from your inventory into the container as possible.
    Swap simply swaps the items from the container and your inventory.
    You can add an item name or ID after swap or loot to exchange only the specified item.
    Sort allows you to sort items by name (default) or total amount of items.

    All commands combine stacks where possible to save space!

    You can enable a basic compatibility with chest protection by requiring users to open a container before they're allowed to use OCD on it. Enable this behavior in the configuration file.

    Changelog:
    v1.10 - 4/14/2011
    * [ADD] Multiworld support.
    * [ADD] Support for stashing/looting item durabilities (colored cloth).
    * [CHANGE] Updated item database.
    * [FIX] A protection issue with not recognizing a double chest as a single item.
    * [FIX] Various Bukkit breakages.

    v1.01 - 3/31/2011
    * [CHANGE] Various Bukkit breakages.

    v1.0 - 2/19/2011
    * [ADD] Support for Dispensers.
    * [CHANGE] Some tweaks that Bukkit devs have deemed necessary.
    * [CHANGE] Using Bukkit's ray tracer instead of OLib's now.
    * [REMOVE] Check for Bukkit chest bug, seems to have been fixed now.

    v0.9 - 2/07/2011
    * [ADD] Support for durability/colors throughout OCD, including sorting.
    * [ADD] Check for Bukkit bug, warns user when the chest is bugged.
    * [FIX] A bug with compacting air due to Bukkit changes.
    * [CHANGE] Converted command implementation to new Bukkit command model.

    v0.8 - 1/30/2011
    * [ADD] New sort: sort by item id.
    * [ADD] A basic compatibility with chest protection mods: you must open the chest to prove ownership (Enable this behavior in config).

    v0.7 - 1/29/2011
    * [ADD] Sort command.
    * [ADD] All commands will now combine stacks as much as possible.
    * [FIX] Putting items in the wrong starting row with large chests.

    v0.6 - 1/27/2011
    * [ADD] Ability to stash and loot only a specific item.

    v0.5 - 1/25/2011
    * Initial release.
     
    Gea and kovarex like this.
  2. Offline

    c0mp

    Oooo, I was looking for something like this with hMod and never quite found it, glad to see this has been created for CraftBukkit. Thanks for submitting, testing now. [​IMG]
     
  3. Offline

    Gimmic

    Suggestion: Could you add a block type/id to the end of the command to specify only that type?
    Example: I am carrying a bunch of cobblestone, I would look at the chest and type /ocd stash 1 to stash all cobblestone.
    I hate click-dragging mountains of raw blocks after a mining run :(
     
  4. Offline

    Nayruden

    Great idea! I'll look into it now.

    EDIT: Implemented :)
     
  5. Offline

    SavageCore

    Is it possible to add sorting of your inventory/chests? That would make this perfect!

    Thanks for the current version though, wondered why it never came to hMod.
     
  6. Offline

    Nayruden

    What type of sorting do you mean?
     
  7. Offline

    Gimmic

    when looking at a chest, you could have a sort feature. Re-order the chest or inventory(if not pointing at a chest) to place whatever you have the most of to whatever you have the least of.. group by itemID
     
  8. Offline

    Cool12309

    The least you can do for sorting is placing stacks to help free up some slots: I know a lot of people who need this.
     
  9. Offline

    IncendiaDrakon

    I'm using the latest CraftBukkit build and I got an error

    Could not pass event PLAYER_COMMAND to OChestDump
     
  10. Offline

    MrYaah

    could you make an /ocd sort feature, it would satisfy my obsessive compulsive disorder greatly ;D
     
  11. Offline

    Nayruden

    Implemented sorting and stack combining to save space (sort, loot, swap, stash all combine stacks).

    Not sure what your problem might be, I don't have enough experience debugging Bukkit. Could you post the full error?

    EDIT: Did you get this error attempting the command on a chest that hadn't been saved to disk yet? If so, see my first post, as it's a known bug in Bukkit.
     
  12. Offline

    IncendiaDrakon

    Well, I was standing in a preexisting chunk, one that my server's village is built in. I placed a chest then tried the command. I'll try emptying a preexisting chest and trying this command.
     
  13. Offline

    Erradyn

    Did a save-all to see if that was the problem, still getting the following.

    java.lang.ArrayIndexOutOfBoundsException: 27
    at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(CraftInventory.java:38)
    at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(CraftInventory.java:10)
    at net.omnivr.ocd.OCDPlayerListener.onPlayerCommand(OCDPlayerListener.java:58)
    at org.bukkit.plugin.java.JavaPluginLoader$3.execute(JavaPluginLoader.java:132)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:60)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:213)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:554)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:528)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:232)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:265)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:201)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  14. Offline

    Nayruden

    You're running into the Bukkit bug. A save-all probably isn't enough. The chunk seems to have to actually be unloaded after you place a chest. You can do this by either leaving the area (and making sure no one else is in it) for a few minutes, or restarting the server. If you'd like this fixed, be sure to mention it to the Bukkit devs.

    Maybe this is a bigger problem on other servers than ours, but we rarely run into the Bukkit bug since we tend to have large store rooms with dozens of chests; since they're more permanent, they're almost guaranteed to have been unloaded once already.
     
  15. Offline

    Gimmic

    Yeah, the bukkit bug is annoying. Is there any way to force an update/reload of the chunk using your plugin?
     
  16. Offline

    Nayruden

    Unfortunately not (or at least not that I can tell).
     
  17. Offline

    IncendiaDrakon

    It works for me now. I placed a new chest, left, then came back.
     
  18. Offline

    silentdojo

    Great Plugin!
    Wondering... I used this with a custom cuboid plugin like WorldGuard's regions. But OCD is allowing my areas chest protections to be breached.
    Is it possible to add an option for needing to be the last person to access the said chest you want to use?
     
  19. Offline

    Nayruden

    Implemented. I tested against LWC, so let me know if you have any with it against your mod. Please note that this protection behavior is off by default, so you'll need to edit the config file that's generated after first run.
     
  20. Offline

    Gimmic

    Great work. I'm still struggling with users complaining about new chests. Is there any way to catch the exception and throw an error back to the user's client? Detect the error and say "Sorry, this chest has not been saved to the chunk yet."
     
  21. Offline

    PierreLouis

    Is it possible to get permission support?
     
  22. Offline

    Nayruden

    There should be. I'll work on that next.

    Through the permissions plugin? Sorry, but I don't want to support permissions until it's officially integrated into Bukkit. (At least not yet, I may change my mind if I feel there's enough reason to).
     
  23. Offline

    silentdojo

    I tested this and it isn't working... thanks for trying.
    The plugin i use is almost exactly like the old cuboid.
     
  24. Offline

    Galdrak

    So I am new to Bukkit, and this is to be my first plugin. I didn't see any instructions on how to set it up. Could you post some instructions, and make them kind of simple, as I am fairly computer illiterate?
     
  25. Offline

    IncendiaDrakon

  26. Offline

    Nayruden

    If you'd tell me the name of it or link me to it, I might be able to make OCD work with it. As it stands, OCD works fine with LWC if you want to use that instead.
     
  27. Offline

    silentdojo

    Nayruden... I sent you a conversation message thru the forum.
    I didn't want to release the plugin to the public yet.
    --- merged: Feb 1, 2011 4:14 AM ---
    Thanks again Nayruden it works perfectly. The only other idea I have is to not let stash take your hotbar items.

    PS Everyone on the server loves this thanks again.
     
  28. Offline

    c0mp

    Great job with the plugin, works great on the server! With the current status of Bukkit, is it possible to extend this plugin to also work with dispensers?
     
  29. Offline

    Nayruden

    Didn't really think about dispensers, will look into it. :)
     
  30. Offline

    c0mp

    Thank you, sir!
     

Share This Page