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

    philraz

    installed dropchest it started working then stoped on server restart got this
    CB 1060
    Code:
    2011-08-23 12:54:46 [INFO] DropChest version 0.8 is enabled!
    2011-08-23 12:54:46 [INFO] Preparing start region for level 2 (Seed: 93610339)
    2011-08-23 12:54:47 [INFO] Preparing spawn area for old, 40%
    2011-08-23 12:54:48 [WARNING] Player Dad_Is not found.
    2011-08-23 12:54:48 [SEVERE] Error occurred while enabling DropChest v0.8 (Is it up to date?): null
    java.lang.NullPointerException
        at com.narrowtux.DropChest.DropChest.addChest(DropChest.java:103)
        at com.narrowtux.DropChest.DropChest.load(DropChest.java:154)
        at com.narrowtux.DropChest.DropChest.onEnable(DropChest.java:94)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:286)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:273)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:149)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  3. Offline

    untergrundbiber

    Same here
     
  4. Offline

    NinjaGrinch

    Doesn't want to play nice with PermissionsBukkit, even through the bridge.

    Also doesn't auto-generate the config file. May want to fix those both.
     
  5. Offline

    oglop

    I agree, please fix :)
    anyway very usefull! big like
    thank you

    also you can add
    normal user can have "varValue" chests
    more imporatnt user can have "varValue" chest
    it would be nice :)
     
  6. Offline

    narrowtux

    Sorry about the exceptions on load, make backups! I fix the issue this afternoon. Also I'm switching from csv to yaml as file format.

    What do you mean? ;)

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

    oglop

    hello you should implement function when dropchest #No. is destroyed it will self remove from
    drophcest list.txt
    I tried to destroy chest, then /dropchest list, I got an internal error

    Code:
    09:35:39 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'dropchest' in plugin DropChest v0.8
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at com.narrowtux.DropChest.DropChestItem.getInventory(DropChestItem.java:101)
            at com.narrowtux.DropChest.DropChestItem.getPercentFull(DropChestItem.java:137)
            at com.narrowtux.DropChest.DropChestItem.listString(DropChestItem.java:471)
            at com.narrowtux.DropChest.DropChest.onCommand(DropChest.java:336)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more

    and SQL, MySQL support will be fine :)

    I mean fuction of max chest for certain group of users (like in virtual chest plugin see at how to set max chest limit .. spoiler)

    uuhh

    I tried if I can add chest with name instead of add chest then set its name

    Code:
    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'dropchest' in plugin DropChest v0.8
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NumberFormatException: For input string: "pipka"
            at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
            at java.lang.Integer.parseInt(Integer.java:449)
            at java.lang.Integer.valueOf(Integer.java:554)
            at com.narrowtux.DropChest.DropChest.onCommand(DropChest.java:272)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
     
  8. Offline

    Simanova

    DC 0.8
    CB 1063
    Linux Debian Squeze 64 bit
    Sun Java 1.6_26 , 64bit
     
  9. Offline

    narrowtux

    Hmm it seems the transition to more efficient block lookups left that over. Also, the second error you posted is normal because it expects a number there.
    SQL would be an overkill and you wouldn't gain performance improvements from that BTW.
    Max dropchest number would be possible easily now, however, I need a new approach for getting per player information as permissions is clearly obsolete now.
     
  10. Offline

    oglop

    ahhh there was my mistake!
    as admin i had '*'
    dropchest.destroy - To be able to break a dropchest without removing it before.
     
  11. Offline

    narrowtux

    No no it's supposed to remove the dropchest itself then ;)

    Release v0.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

    Sorry when you can't download the new version just now, there are some issues with my webspace.

    Okay 0.8.1 is up now!

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

    oglop

    how does the protection work?
    Plugin said chest is protected but other player could accessit and destroy it

    my permissions

    PHP:
    groups:
     
    Member:
            default: 
    true
            permissions
    :
            - 
    dropchest
            
    dropchest.create
            
    dropchest.remove
            
    dropchest.which
            
    dropchest.filter
            
    dropchest.filter.set 
            
    dropchest.filter.reset
            
    dropchest.protect
     
  13. Offline

    parry.jacob

    I was wondering if there was a way to make it so that it just checks for OP instead of permissions.
     
  14. Offline

    narrowtux

    If no permissions is installed, everyone may create dropchests.
     
  15. Offline

    philraz

    Downloaded 8.1
    its a bit buggy created 5 drop chests set filters and radius all ok but then when I created a 6th chest it overwrote chest 1 the seventh overwrote 2 and so on, also no config file is being generated on install creating one using the text in your OP returns an error on server start

    manually editing the yml file does allow the extra chests to be loaded
    .
    CB 1060
    Win 7
    spoutcraft RB client
     
  16. Offline

    narrowtux

    Was it overwritten in the yml file or in the plugin at all? How many chests do you see when you type /dc list?
     
  17. Offline

    Simanova

    0.81 is working really good! Thanks to narrowtux
     
  18. Offline

    philraz

    it was overwritten in the yml (the coordinates were changed and filters removed)

    The list would only ever show 5 chests it does show more now I have manually entered extra chests into the yml
     
  19. Offline

    narrowtux

    Are there errors when you save?
     
  20. Offline

    philraz

    none simply overwrites the cordinates
     
  21. Offline

    narrowtux

    I'll test it at home.
     
  22. Offline

    philraz

    no biggy like your plugin will just edit the yml file until it sorted

    Whats the story with the config giving start up errors ?
     
  23. Offline

    Simanova

    0.81 is filling my server.log with debug information:

    please stop that!
     
  24. Offline

    narrowtux

    You can ignore that and default values will be used instead.

    Oops :D

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

    Simanova

    When i use /dc or /dropchest ingame this message appears:

    [​IMG]

    The point is ... iam the serveradmin and operator :)
    Ive got no permission system, cb 1063, dc 0.8.1 and java 1.6_26 - 64 bit under linux debian

    my config says:
     
  26. Offline

    narrowtux

    Do you have a Permissions system? If not, *cough* that means you have to install one for superperms until I make default values for all the permissions.
     
  27. Offline

    Simanova

    I removed my permission system yesterday, because we need those crap not longer.

    Our permission system caused more trouble, than it solved!

    Only 70% of all plugin were compatible.

    Without permission system 95% are compatible.

    Please update your plugin for default op permissions or iam not longer able to use it ( and many other people, too )
     
  28. Offline

    skore87

    Instead of trying to hook into the countless other plugins that can remove blocks, doing a simple check during any query of a DC chest to see if it exists. If it doesn't simply remove it from the database file and resume the action it was doing.
     
  29. Offline

    narrowtux

    It's already fixed and it does exactly that.
     
  30. Offline

    Darsith

    Two things that I have noticed (that have been mentioned).

    1) new drop chests are not being retained after a server restart. My users have noticed that the chests will work until the server is restarted.

    2) if a drop chest radius over laps, and the radius is for a chest that specifically sucks an item (ex: chest 1 sucks only cobblestone and chest 2 only sucks sand. These two chests do nothing. -actialu testing by me points towards my users are on crack.

    what I saw was with 3 chest. chest 1 is sand, chest 2 is cobble, chest 3 is everything (no filter). Sand gets sucked up, but cobble does not. Not even into the general chest. even tried using the actual command instead of the interactive method.

    If I killed the cobble chest, could still not get the cobble to be sucked. After removing the sand chest, the loose cobble was sucked by the general chest.
     
  31. Offline

    Raycrash

    Ok I love it but is it intended so that only one half of a big chest sucks ?
    Oh and I made a suckchest which placed the items in the 4th row ?? (big chest)
     

Share This Page