Inactive [MECH] DropChest v0.8.3 - Chests that absorb dropped items [1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by narrowtux, Feb 9, 2011.

  1. Offline

    narrowtux

    DropChest - Chests that absorb dropped items
    Version 0.8.2
    [​IMG]
    Important! When migrating from 0.6 to any above version, you have to move the DropChest.txt from server/plugins/DropChest.txt to server/plugins/DropChest/DropChest.txt
    This is because I have to follow the Bukkit plugin saves guidelines.

    This plugin automatically adds dropped items to near chests. That is very useful for automatic farming and monster traps that gather loot.
    Features
    • automatically suck dropped items that are near a chest to that chest
    • customizable warning if the chest is nearly full
    • list your DropChests and watch how much percent is still free
    • Permissions
    • Filter
    • Storage Minecart support
    • Dispenser and Furnace support
    • Item information
    • Chest protection
    • Automatic Owner tracking
    • Double-Chest support
    Download

    DropChest.jar
    GitHub Project (Source Download)
    Download development version

    Donate, if you want to support me ;)

    Video



    Usage
    Commands
    Show commands (open)

    To add a chest to the "watchlist", type
    Code:
    /dropchest add [radius]
    After that, rightclick the chest that you want to add. Radius is the radius in which the Chest should suck items. Default value is 2.

    To remove a chest from the "watchlist", just type
    Code:
    /dropchest remove chestid
    where chestid is the number of the chest that you get when you call /dropchest list

    You can list the chests that are on the watchlist via
    Code:
    /dropchest list
    You can adjust the radius of a chest via
    Code:
    /dropchest setradius chestid radius
    You can check which id and radius the Chest in front of you has:
    Code:
    /dropchest which
    after that, rightclick on the Chest to get information about it.
    If you are sitting in front of the console, or don't want to rightclick, you can use
    Code:
    /dropchest info chest
    It will generate the same output as /dc which.

    You can teleport to a chest via
    Code:
    /dropchest tp chestid
    where chestid is the ID of the dropchest

    You can set the name of a DropChest via
    Code:
    /dropchest setname {chestid} {newname}
    The name is displayed in chest is full warnings, and in the DropChest list!

    If you migrate from 0.6 to 0.7, you can set the owner of a dropchest by typing:
    Code:
    /dropchest setowner {chest} {newowner}
    You can protect a chest by typing
    Code:
    /dropchest protect {chest} {on|off}
    You can always use /dc instead of /dropchest if you are lazy.

    Another very helpful command is /dcitem:
    Code:
    /dcitem [NAME|id]
    
    This can be used to obtain the name of an item by it's id or get an id of the item-name.
    This doesn't work with all names, though.

    Use the new command /chestinfo {name|id} to get info about what's inside the chest.
    Omit the argument and rightclick on any chest to get info about that.
    Example:
    Code:
    >/dcitem 4
    4 is COBBLESTONE
    >/dcitem cobblestone
    COBBLESTONE is 4
    

    Show Configuration (open)

    You can configure DropChest by pasting the contents of the following block to plugins/DropChest/dropchest.cfg
    Code:
    #Should the dropchest drop items when it gets a redstone signal?
    droponredstone=true
    #How long should the dropchest not suck items after it has dropped them
    waitafterdrop=10
    #Should users be able to protect chests like in LWC?
    usercanprotectchest=true
    #Which is the default radius if you omit the radius argument in /dropchest add?
    defaultradius=2
    #Which should be the maximum radius for players that have not dropchest.setBig and aren't ops?
    fallbackradius=15
    #At which fill-status should the chest warn you?
    warnfillstatus=90
    #Which message should appear as warning?
    #You can use this variables (example):
    # $owner : the owner of the chest (narrowtux)
    # $name  : the name of the chest (my superduper mobtower chest/#42)
    # $fill  : The fill status, in percent (81)
    warnmessage=$owner, your chest $name is nearly full($fill%).
    

    Filter / Storage Minecarts
    Show Filter/Storage Minecarts (open)

    Filters have changed in version 0.6. There are now 3 seperate filters that are for sucking items, pulling items from passing minecarts and pushing them to passing minecarts.
    You can now set the filters by either using commands or using the interactive mode. Let me show you the interactive mode first:
    to begin, type
    Code:
    /dropchest filter {suck|push|pull}
    Note: choose one of suck, push or pull, please (for example /dropchest filter suck)
    Then you will enter the interactive mode. In this mode you can edit the selected filter by hitting the chest with the desired item in your hand.
    To edit another filter, type the above command again.
    To finish your filter, type
    Code:
    /dropchest filter finish
    Commands mode:
    Code:
    /dropchest filter {suck|push|pull} {chestid} {itemid|itemtype|clear}
    Call the filter-command like above, as second argument, use the chest-ID, and as third argument, either type the item-ID, the name of the item (as they appear here: org.bukkit.Material) or type clear to clear this filter.
    Please note! The suck filter acts different from the Pull/Push-Filter when it's empty. When the suck-filter is empty, the chest will suck every item. When a Pull/Push filter is empty, it won't take or give any items to a passing minecart.

    Show Permissions nodes (open)

    You can use these nodes:
    • dropchest - To get the right to use DropChest
    • dropchest.create - To call /dropchest add
    • dropchest.remove - To call /dropchest remove chestid
    • dropchest.radius.set - To set the radius of a Chest to something else than 2
    • dropchest.radius.setBig - To have unlimited radius
    • dropchest.which - To have access to the /dropchest which command
    • dropchest.teleport - To be able to teleport via /dropchest tp chestid
    • dropchest.filter - To set or reset filters
    • dropchest.filter.set - To set filters in interactive mode
    • dropchest.filter.reset - To reset filters in interactive mode (click with nothing in hand)
    • dropchest.list - To have access to /dc list and /dc info
    • dropchest.destroy - To be able to break a dropchest without removing it before.
    • dropchest.protect - To be able to protect a chest
    • dropchest.moderator - To be able to modify a dropchests properties even if you're not the owner. Also, ops and the console can do that.
    You can use these variables:

    • dropchestmaxradius - To adjust the maximum radius for a group or a user
    How to use variables:

    Code:
    users:
      narrowtux:
        info:
          dropchestmaxradius: 1000
    
    This is just an example and this also works with groups!

    Changelog
    Version 0.8.2
    • Fixed the loading issue.
    Version 0.8.1
    • Supports SuperPermissions (when no Permissions plugin was found)
    • Fixed show stopping bugs.
    • Use YAML as persistence storage. You can find the new file at plugins/DropChest/dropchests.yml
    Show Changelog (open)

    Version 0.8
    • Performance improvements
    • Fixed a bug that caused dropchest to eat stacks in storage minecarts (thanks @Tenebria )
    • Implemented per-chest delay (thanks @Gibbers )
    • Made /dc list per player. Use /dc list {pagenum} all to see all showcases (works without all in the console)
    Version 0.7.9
    • Fixed bug where items were lost when a chest/minecart was full on pushing/pulling
    • Little code cleanup
    Version 0.7.8
    • Fixed a bug where, for example, if you had several ItemStacks of 1 block each, only 1 ItemStack would be pulled to the chest or pushed to the MineCart, the others would be deleted.
    • Minecarts can now be over/under DropChests to be handled
    Thanks M-Type!
    Version 0.7.7
    • Double Chest support
    Version 0.7.6

    • Fixed some issues when using a Permissions implementation that is not complete (in this case EssentialsGroupManager as reported by @Kartus )
    Version 0.7.5

    • you can add all items to a filter by using the keyword "all" instead of the material-type
    • you can obtain info about a dropchest without having to rightclick (/dc info {chest}). However, the output is the same as when you would have called /dc which
    Version 0.7.4

    • warnfillstatus=-1 now disables the "chest is full"-warning
    Version 0.7.3

    • Fixed a bug that came with a new Bukkit release
    Version 0.7.2

    • /dc which now says something again, thanks to @Liger_XT5.
    Version 0.7.1

    • Removed debug messages :D
    Version 0.7

    • Configuration added
    • DropChests can drop their contents when a redstone input is present
    • Now, only the owner of a dropchest can adjust it's properties
    • The owner of a dropchest can protect the chest. So other players can't open it.
    • Customizable warning message and fill threshold.
    • Warnings will now be displayed to the owner of a chest, if he is online.
    • And made compatible to Minecraft 1.5_01. Older versions of craftbukkit won't work!
    Version 0.6.9

    • /dc which even more fancy
    • Removed debug message reported by @Reterg
    • Implemented the /item command which tells you what item this id is or vice-versa.
    Version 0.6.8

    • /dc which now looks fancy and shows the filtered items, too.
    Version 0.6.7

    • Added dropchest-id to the /dc which output.
    Version 0.6.6

    • Fixed NullPointerException on startup
    Version 0.6.5

    • Fixed /dc which
    • Refactored some code
    • You can now also use names of dropchests in the commands.
    Version 0.6.4

    • Fixed chunk unload that results in crash
    Version 0.6.3

    • Updated to bukkit-version 602
    • Tried to fix Thread-Exceptions. Breaking DropChests still not fixed, maybe happens later this day ;)
    Version 0.6.2

    • Permissions not required anymore.
    • Thread-Safe. No more ConcurrentModificationCheck Exceptions!
    Version 0.6.1

    • Fixed loading issues. You have to move your old DropChest.txt to the folder DropChest/ in your plugin directory!
    Version 0.6

    • Seperate filters for sucking, pushing to minecarts, pulling from minecarts
    • Multiple users can add dropchests at the same time now!
    • Added a name to the DropChests
    • Fixed Minecraft 1.3-Bug (method net.minecraft.server.Entity.q() was not available any more)
    I'm working on extended furnace handling, that fuels automatically go to the fuel slot and so on. This is still buggy so I didn't released it, it comes in the next version.


    Version 0.5.1
    • Multiworld works now
    • Paginated /dc list
    • Persistent DropChest IDs
    Version 0.5

    • Added support for Storage Minecarts
    • Added support for Dispensers and Furnaces
    Version 0.4.2

    • Fixed bug that Tearlow described.
    Version 0.4.1

    • Fixed loading bug when migration from versions 0.3 or below
    Version 0.4

    • Added filters.
    Version 0.3.1

    • Multiple world support
    • Since the Craftbukkit version from feb, 13 at 12:00 CET, Chests that are destroyed by Players are rebuilt
    • Worked around NullPointerException when Permissions is not loaded properly
    • Files now hosted on github ;) that non-members also can download DropChest
    Version 0.3

    • Permissions support.
    • Configure the maximum radius for each single user or group (via Permissions)
    • Fixes bug with unhandled Exception in the EntityWatcher-Timer.
    • /dropchest can be called via /dc for short
    • /dropchest without arguments just lists the commands that the user can execute, as well as his maximum radius.
    • Oh, and I corrected the Pythagoras formula for radius calculation. Shame on me...
    Version 0.2.3


    This is quite a huge bugfix update. Permissions come next ;)
    • Broken DropChests are now automatically removed from the list
    • changed package name from com.bukkit.narrowtux.DropChest to com.narrowtux.DropChest to prevent not loading issues coming up next monday
    • Added command "which", that allows you to see which id a chest has and if it is already a dropchest.
    • Linked against the most recent versions of Bukkit and Craftbukkit. The Bukkit guys have fixed a lot of bugs that affected this plugin. In my tests, there were no more nullPointerExceptions or similar errors. Also, DropChest now also works on very fresh placed Chests
    • And a currently constant maximum radius of 20 blocks
    Version 0.2.2

    • DropChest are now removed when you call /dropchest remove chestid
    • DropChest now have a minimum radius of 2
    • Fixed some saving issues
    Version 0.2.1

    • Fixed a problem where the radius has not been saved
    Version 0.2

    • Added a radius
    Version 0.1

    • First Release of DropChest
     
  2. Offline

    Milso

    every time some one destroys a block every one gets notified right now
    "A block has been destroyed."
    this is regardless of range from the box
     
  3. Offline

    Afforess

    Using Math.Sqrt that many times is extremely expensive. It's not necessary, since you could just square the radius, and then compare the distances from the radius^2 and the distance^2, and save a TON of CPU cycles.

    If you're not sure what I mean, I'd be happy to show you how to change it.
     
  4. Offline

    narrowtux

    Looks like Permissions has not loaded properly. Check your terminal for errors of Permissions. I had the same error and my Permissions file was corrupted.

    btw, I'm also german ;)
     
  5. Offline

    Don Redhorse

    there is already a plugin with that function.. let me look

    DeadMansChest http://forums.bukkit.org/threads/3923

    haven't tried it yet though
     
  6. Offline

    Sebi

    Yes, I do have them and other plugins, like LWC, iConomy, WorldGuard or Essentials and many other are working.
    Any suggestions?

    Oh, and when exception I posted before occurs, I am kicked with Internal Server Error reason.
     
  7. Offline

    narrowtux

    Ok, I try to work around it, but it seems that the PermissionHandler is not loaded properly. Which version of Permissions are you using?
    --- merged: Feb 13, 2011 9:35 PM ---
    I linked it to Permissions v2.0 so you might get it.
    I worked around if Permissions is too old or if an other error occurs, an Exception occurs. Instead of this, all operations will be allowed.
     
  8. Offline

    SpiiderPig

    Great Plugin, but i got an quick question...i'm not using Permission because i didnt had the need for it.
    It isnt possible to run that Plugin without Permission ? I wouldnt care if every1 on my Server could use the commands. :)
     
  9. Offline

    narrowtux

    At the moment, it is not possible to run it without Permissions. But you can simply install Permissions and give the right '*' to everyone, for example by adding this permission to the group Default.
     
  10. Offline

    PrivateAlpha

    Quick tip: github
    github allows for easy source management & downloads!

    I dont like having to sign up just to download :/
    --- merged: Feb 14, 2011 12:59 AM ---
    now THAT pissed my off.... but i'll be nice... i'll add the dl to my github for a temp...

    download link broken for me
     
  11. Offline

    ethzero

    Awesome plugin, just tried it out on my server's large scale farm.

    Currently i've two double-chests, one for Wheat & one for Seeds.
    To avoid these two pairs of chests filling up with all manner of unwanted crap, is it possible to have chests only collect certain stuff so that can essentially filter content?
    I can imagine this would be useful for Miners too that many DropChests could separate various ores collected.

    On and separate note, it's possible to zone a cuboid 'WorldEdit' style that way i'd know that only Seeds dropped on my farm rather than my close neighbours would be picked up.

    Cheers
     
  12. Offline

    PopeUrban

    Any chance I can get an easy way to toggle this? Working up a traps intensive pvp server and this would be fantastic for miner traps, but the invincible chests are kinda counter to the theme of the server.
     
  13. Offline

    Tearlow

    Hey Tux, this is looking good but I have encountered times when it simply stops working (v3 test you made) I will however upgrade to the new one in a second. I got one question though, Could you add like an announcer-tag? If the chest is full It's a global announcement. If we could with say a permission like "dropchest.annaunce"? If not that how about the one who create the chest will only get that? Just realized, how about keeping two different setups. One for Public (/w global announce) and Private (w/ announce to the person who created it)? :)

    Wicked work so far mate!
     
  14. Offline

    narrowtux

    Thats just for DropChests, I forgot to mention ;)
     
  15. Offline

    PopeUrban

    That's what I'm asking though, a config option to make the drop chests vulnerable to destruction would be fantastic. I'd like my players to be able to

    A: Find your creeper trap
    B: loot all of your sulpher
    C: destroy your creeper trap utterly

    The general idea here is a darn good one for what I'm aiming for. Allows players to more easily mb farm, but also allows them to make some nice miner booby traps with little whistles that say "someone fell for your landmine trap and your faithful chest has collected the loot!" :)

    The only thing stopping me from implementing it is the invincibleness of said chests.
     
  16. Offline

    narrowtux

    this was a debug message until i noticed that the block_break_event hasnt been implemented. Yesterday at 12:00 CET, this event has been implemented and I was very surprised about this message too :D.In version 0.3.1 this message has been removed.
     
  17. Now it works fine in Multiple Worlds.
    But after I restart the Server I get the following error:

    15.02.2011 00:49:21 org.bukkit.craftbukkit.CraftServer loadPlugins
    SCHWERWIEGEND: null (Is it up to date?)
    java.lang.NullPointerException
    at com.narrowtux.DropChest.DropChest.load(DropChest.java:137)
    at com.narrowtux.DropChest.DropChest.onEnable(DropChest.java:83)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:425)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:171)
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:158)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

    After I delete the DropChest.txt the Server start again without Error.
     
  18. Offline

    RustyDagger

    YES Finally what i was looking for Just a question before i add it to my server.

    what will it do if i set the max radius to 1 that would be less than the default i don't see that being good.
     
  19. Offline

    narrowtux

    It's not possible because it wont suck items properly then. Some items would stay visible, that are very near to this chest.
     
  20. Offline

    RustyDagger

    Yea noticed its fine i just set the min to 2 and all is good.

    after about 30 seconds using it i found a very large bug that im not sure how you missed. it dupes items very easy.

    i had 1 wooden sword on me i looked just infont of the chest and pressed q like 10 times i only seen 1 item hit the ground but opend the chest and there were 10 inside.

    im not sure how you can fix it besides wait till they are on the ground and not just use the players q event?

    i also know that lag is a big problem when 100 or so of them item drops are all bunched up for now what i have been doing for when the chest fills up is like

    [​IMG][​IMG][​IMG][​IMG][​IMG]
    [​IMG][​IMG][​IMG][​IMG][​IMG]

    but i think that is killing some items. before the chest is full destroying the items that wont fit in the chest would be handy.
     
  21. Offline

    narrowtux

    I have no lag on my localhost server, if you know what I mean. I never experienced a duplication bug like this.
    You could try something like this, if I'm getting you right, that this should destroy items but some of them should be kept:
    [air][water][water][water][water][water]
    [air][chest][cobble][cobble][cobble][cobble]
    [lava][cobble][cobble][cobble][cobble][cobble]
    Or you could try to increase the radius a bit. A radius of 2 is not enough for this.
    --- merged: Feb 15, 2011 8:40 AM ---
    I try to fix it.
    --- merged: Feb 15, 2011 8:54 AM ---
    I understood your simplification and implemented it in version 0.4
     
  22. Offline

    RustyDagger

    any smp is bound to encounter lag at some time and my server is based around a very strict earn it or dont have it.

    I dont give items out not even to my self besicaly only owners and super admins even have access to /i so this is a very huge problem my users are always trying to dupe items i had to remove controller block because they managed to dupe torches with it a user had 36 stacks or torches :/ any server with an economy system in place will know where im coming from.

    Edit also your idea for destroying extra items that wont fit in the chest (or dont meet the filter is a very good 1 thanks.)

    if you could sort out the duping problem it would be win thx

    i think the problem is some thing you are using to detect the item to pick up is based on the client 2 much and not just what the server is seeing. (just my guess)

    also i made this pretty epic auto sorting storage system using it its like this:

    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG] <water flows that way
    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG]

    theres a layer holding the water in except where the cobble is that has a sign on the wall stopping the water from coming out walk up and drop all the items in the chest and the filters take car of the rest. some comes out the other end and i pick that up and drop it into the next set of filters.
    if water would flow more than 7 blocks i would be set...
     
  23. Offline

    Tearlow

    Love the filter Tux! Absolutely fantastic!

    I do still have the same problem as before with multiply chests, having two chests within the same area as the other causes the second one not to gather anything.

    For ex. First chest has a range of say 50 and only picks up apples. The second one has a range of 25 and is roughly 10 blocks away and will only pick seeds- But the seed-box never picks up anything...
     
  24. Offline

    Juze

  25. Offline

    narrowtux

    Thank you!
    I fixed your bug also:D At first I didn't understand whats the problem but now I've seen it in the source. Download v0.4.2, that fixes it.
    --- merged: Feb 15, 2011 1:09 PM ---
    No all bukkit-plugins are entirely server-based. My server is on the same computer as I play so there is no lag at all.
    I don't know why this is duping items... What server-version do you have got?
     
  26. Offline

    RustyDagger

    312 its much less than what you recommend i know but your plugin is 1 of like 4 that are up that high makes it hard to run it at that build. when you have many other plugins all needing lower builds or are not updated that high yet.

    Apart from the duping issue it all works fine and dandy. I srsly don't think my build has any thing to do with the fact that spamming q sends multiple item dropped events when in fact it only dropped 1.
     
  27. Offline

    Tearlow

    This is somewhat off-topic but wanted to ask what hardware you use? Currently for unknown reasons the server software shoots up to 100% if both Server/Client are being run at the same time. This causes lag for me :) I'm currently stuck on a E6800 OC'd to 3.5GHz.

    Also, Giving 4.2 a try in a second :)
     
  28. Offline

    narrowtux

    No this server version is absolutely okay.
    Maybe the client really sends out multiple drop events when the user presses q but it does not drop instantly. Have to try this on a public server when my ping is low :D
    --- merged: Feb 15, 2011 1:19 PM ---
    I'm using a MacBook 5,1 (aluminium) which has just 2 GB Ram and 2,0 GHz Core 2 Duo Processor, if that helps.
     
  29. Offline

    RustyDagger

    Could you not check the count of what the player has in hand and make sure it dont add more than that to the chest?
     
  30. Offline

    Tearlow

    Flawless mate! As you said, There are no more issues and there really isn't!

    EDIT: Ahm, one thing :) Trying to destroy the chest will spawn with All items being accepted *Chuckles* That's fine though!

    That does say quite a bit. Something is fishy on my side, guess it's time to diagnose my system...
     
  31. Offline

    narrowtux

    1. This would be too much effort and 2. this would be too buggy. I can't really do it. Is this bug replicable, please make a video of it or so...
     

Share This Page