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

    spelmyst

    Found a bug.
    If it has already been reported, I apologize.

    When performing a "/dc which" and right click on the chest.
    The ID being returned, is not the ID of the chest, but the entry in list.

    Code:
    -807.0,56.0,-75.0,3,world,,NORMAL,4,Dagney2;EGG,BONE;PULL;PUSH
    -107.0,46.0,153.0,3,world,,NORMAL,6,myst01;SUCK;PULL;PUSH
    -861.0,5.0,-73.0,8,world,,NORMAL,7,Dagney3;SUCK;PULL;PUSH
    -861.0,5.0,-74.0,8,world,,NORMAL,8,Dagney4;SUCK;PULL;PUSH
    -884.0,9.0,-240.0,10,world,,NORMAL,9,;SUCK;PULL;PUSH
    -807.0,56.0,-74.0,3,world,,NORMAL,10,Dagney;SUCK;PULL;PUSH
    -108.0,46.0,147.0,2,world,,NORMAL,11,;SUCK;PULL;PUSH
    
    For instance, doing a "/dc list" and right clicking on a chest. It returns "ID : 5 RADIUS:10".
    Which is actually chest #9. The ID is returning 5, because #9 is fifth on the list.
    [MERGETIME="1299817671"][/MERGETIME]
    Also, noticed that we need to add "dropchest.list" to the list of permissions. My guys couldn't use the command until I specifically added it.

    By the way. I and the rest of my clan LOVE this plug-in. Keep it going. :)
     
  3. Offline

    big_fish

    Hi narrowtux,

    first of all, great plugin!

    I've some issues to clarify as per following:

    1. chest ID - any way to make the chest ID run in sequence after chest removal? It seems like chest IDs keeps on going up and the number will only reset after a server restart.

    2. anyone has minecart storage push/pull working? mind explaining how do i set up a push/pull to a minecart storage?

    *edit* for point 2, I did managed to get the pull from minecart storage working but no for push to minecart storage.
     
  4. Offline

    narrowtux

    1. This is meant to have persistent chest ids that don't change when you delete one.
    2. You have to set at least one filter for pushing or pulling that this works.
     
  5. Offline

    Jensbj

    Hi could you Plz make a video how to install the plugin. Im not sure what to to.
    [MERGETIME="1299859472"][/MERGETIME]
    To do*
     
  6. Offline

    big_fish

    Yeah I have 2 chests with filter push set and 2 chests with pull set running on a same minecart storage track. It appears that only the pull is working though, can't get the push chests to fill up the minecart.
     
  7. Offline

    Ssagoa

    Hello narrowtux great plug-in

    3 issues we have found read through the above post and didn't see anything about these issues if i missed them i apologize

    #1 when useing the bed to fast forward through night cycle seems to break the drop chests , restarting the server fixes the issue

    #2 when someone dies it also breaks the drop chests , restarting the server fixes the issue

    #3 when setting up a chest to push items to a cart it pushes 2 stacks but only one stack is shown in the cart and when i pull to a chest only one stack gets pulled so somewhere in the x fer i am losing a stack of items ( i used stacks of eggs for the test )

    Are these a known issue or do i did i miss something on the install that fixes these issues

    thanks for the great mod keep up the great work
     
  8. Offline

    big_fish

    fixed my issue with using small chest instead of large chest and placing chest 1 block away from minecart track. the chest 2 blocks away couldn't push/pull successfully.

    not sure if it's supposed to be this way though.
     
  9. Offline

    Jensbj

     
  10. Offline

    Reterg

    @Jensbj
    Just put the DropChest.jar into the bukkit plugins folder. That's it, it's installed.
    Then follow the comands in shown in the original post, which also has a video.
     
  11. Offline

    Jensbj

    @Reterg
    but then when i start the server it said :
    12:53:23 [SEVERE] com/nijikokun/bukkit/Permissions/Permissions loading DropChest
    v0.6.1 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijikokun/bukkit/Permissions/Permissions
    at com.narrowtux.DropChest.DropChest.setupPermissions(DropChest.java:100
    )
    at com.narrowtux.DropChest.DropChest.onEnable(DropChest.java:64)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:414)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: com.nijikokun.bukkit.Permissions.Pe
    rmissions
    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:30)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 12 more
     
  12. Offline

    Reterg

    I think you need to install the Permissions plugin. I just tried to run my server without Permissions and got something like that error.
     
  13. Offline

    pixartist

    Thanks for this addon !
     
  14. Offline

    Jensbj

    Thank it helped alot. :D
     
  15. Offline

    narrowtux

    Oh, thanks for pointing it out: The chests have to be the next block to the minecart track. Then it works. Radius is ignored, because this check is much faster.
     
  16. Offline

    pixartist

    randomly got this error (while the server was running...):

    Code:
    09:12:26 [INFO] Warning! An error occured!
    09:12:26 [SCHWERWIEGEND] java.util.ConcurrentModificationException
    09:12:26 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.checkForComodifica
    tion(Unknown Source)
    09:12:26 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.next(Unknown Sourc
    e)
    09:12:26 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftWorld.getEntities
    (CraftWorld.java:474)
    09:12:26 [SCHWERWIEGEND]        at com.narrowtux.DropChest.EntityWatcher.run(Ent
    ityWatcher.java:36)
    09:12:26 [SCHWERWIEGEND]        at java.util.TimerThread.mainLoop(Unknown Source
    )
    09:12:26 [SCHWERWIEGEND]        at java.util.TimerThread.run(Unknown Source)
    >
     
  17. Offline

    narrowtux

    Ignore that ;)
     
  18. Offline

    scott1997880

    can we get an old download or one that doesnt require permisions or is this an error "you may not use DropChest please ask your op to enable this plugin for you"
     
  19. Offline

    spelmyst

    Does anyone know how to setup Eclipse so I can look at this code too?
    I can't get the Permissions to reference, and apparently no one in the Permissions forum knows how to tell me either.

    [​IMG]

    What am I missing or doing wrong?
    spelmyst@yahoo.com - That way you can call me an idiot, or help. I'll understand either way. :)
     
  20. Offline

    Reterg

    Might be something wrong with the permissions nodes.
    I have 'dropchest.*' in the permissions and I get the same message that scott1997880 mentioned.
    "you may not use DropChest please ask your op to enable this plugin for you"
    However, if I become admin with '*' / all permissions, I can use it fine.

    EDIT: I really should test my idea's before I post. [​IMG]
    You need to give permissions to 'dropchest' as well as 'dropchest.*'
     
  21. Offline

    The PC Tech Guy

    Sorry, but I see this too (just the concurrentmodificationexception), and I've noticed that DropChest either:
    • Doesn't work at all (doesn't suck up items, nor does adding/removing work)
    • Sucks items, but don't appear in the chest
    I'm using CB 531, the RB. Really wished this was fixed... I'll just wait it out.
     
  22. Offline

    Reterg


    Yeah. I get the error when a player logs out or goes to another world. Then messages saying that a dropchest has broken and will be removed keeps coming up. After that, the chests concerned don't suck up items until a server restart.
     
  23. Offline

    narrowtux

    You have to give the Permission dropchest to everyone who wants to use dropchest. Also, you have to give some of the dropchest.xxx permissions to someone.
     
  24. Offline

    big_fish

    thanks alot for the clarification.
     
  25. Offline

    scott1997880

    yeah can you make one that uses group manager or dosnt require premissions
     
  26. Offline

    narrowtux

    No I wont support all of the 132789242 versions of Permission implementing plugins. GroupManager already supports a convenience wrapper for permissions so this should not be a problem.
    Also, I'm waiting for the official Permissions support in bukkit, and will implement permissionsupport in all my other plugins when it works, and not earlier.
     
  27. Offline

    h0us3cat

    ...
     
  28. Offline

    pixartist

    Code:
    18:13:08 [INFO] Warning! An error occured!
    18:13:08 [SCHWERWIEGEND] java.util.ConcurrentModificationException
    18:13:08 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.checkForComodifica
    tion(Unknown Source)
    18:13:08 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.next(Unknown Sourc
    e)
    18:13:08 [SCHWERWIEGEND]        at com.narrowtux.DropChest.EntityWatcher.run(Ent
    ityWatcher.java:46)
    18:13:08 [SCHWERWIEGEND]        at java.util.TimerThread.mainLoop(Unknown Source
    )
    18:13:08 [SCHWERWIEGEND]        at java.util.TimerThread.run(Unknown Source)
    18:13:09 [INFO] Warning! An error occured!f
    18:13:09 [SCHWERWIEGEND] java.util.ConcurrentModificationException
    18:13:09 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.checkForComodifica
    tion(Unknown Source)
    18:13:09 [SCHWERWIEGEND]        at java.util.AbstractList$Itr.next(Unknown Sourc
    e)
    18:13:09 [SCHWERWIEGEND]        at com.narrowtux.DropChest.EntityWatcher.run(Ent
    ityWatcher.java:46)
    18:13:09 [SCHWERWIEGEND]        at java.util.TimerThread.mainLoop(Unknown Source
    )
    18:13:09 [SCHWERWIEGEND]        at java.util.TimerThread.run(Unknown Source)
    After this more and more chests start to "break" according to the addon, and often I can't add new chests... when doing /dropchest add and rightclicking on a chest, the chest will just open like normal
     
  29. Offline

    Joeyy

    Same as the guy above, would really see an update of this plugin ;D.
     
  30. Offline

    Kartus

    i got these errors each ca. 3secs when i use "/dynmap fullrender" from dynmap plugin, #531, DC 6.1. i can imagine that this doesnt do any real issues for my server, reason would be under last Server-CPU. but its spamming my server.log. probably something easy to fix...
    Code:
    2011-03-15 14:38:00 [INFO] Warning! An error occured!
    2011-03-15 14:38:00 [SEVERE] java.util.ConcurrentModificationException
    2011-03-15 14:38:00 [SEVERE]     at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:782)
    2011-03-15 14:38:00 [SEVERE]     at java.util.ArrayList$Itr.next(ArrayList.java:754)
    2011-03-15 14:38:00 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getEntities(CraftWorld.java:474)
    2011-03-15 14:38:00 [SEVERE]     at com.narrowtux.DropChest.EntityWatcher.run(EntityWatcher.java:36)
    2011-03-15 14:38:00 [SEVERE]     at java.util.TimerThread.mainLoop(Timer.java:534)
    2011-03-15 14:38:00 [SEVERE]     at java.util.TimerThread.run(Timer.java:484)
    
     
  31. Offline

    Digi

    WHY is permissions REQUIRED ? I don't want to use permissions, I just want to use ops.txt.
     

Share This Page