Inactive [GEN] DispenserReFill v2.0.1 -- Fill and Refill your Chests and Dispensers [1.2.3-R0.1]

Discussion in 'Inactive/Unsupported Plugins' started by Nitnelave, Jun 5, 2011.

  1. Offline

    Nitnelave

    DispenserReFill
    Download latest
    Source
    Old Versions
    Works on 1.2.3-R0.1

    Are you too lazy to fill your dispensers over and over? Well now, you can do it easily with one simple command! Now works with chests! It takes the items from an adjacent chest or from your inventory to fill the dispenser/chest. Checks if you can access the dispenser/chest with LWC.
    Code:
    /dfill <item id or name>    : Fills the dispenser you're facing(you can use it to clear it's inventory)
    /drefill      : Fills the Dispenser you're facing with the first item found in the dispenser.
    /dautofill <item id or name> : refill a dispenser from the chests around with the item specified(op only : refill a chest or dispenser by spawning items)
    /dautorefill : refill a dispenser from the chests around with the first item in it's inventory (op : spawn the items to refill). If it gets emptied, it remembers the last item.
    To remove an auto-filling chest/dispenser from the list, break it, and wait a little (until a refill has been processed).
    There is a config for permissions : OP, false, or permissions
    Permission nodes :
    Code:
    - 'DispenserReFill.fill'
    - 'DispenserReFill.bypassinventory'    #allows you to create the items rather than take them
    from your inventory. Should only be given to admins.
    - 'DispenserReFill.auto'
    
    Features :
    • Quickly fill or refill a chest/dispenser from the adjacent chests and your inventory
    • Create auto-refilling chests/dispenser
    • Keep chests/dispensers empty
    • Supports Permissions
    • Supports OddItem
    • Supports LWC

    TODO:
    • Per slot refill
    Changelog:

    • v2.0.1 -- Fixed config not getting generated
    • v2.0 -- Updated for 1.2.3-R0.1
    • v1.0.4 -- bugfix for dautofill 0.
    • v1.0.3 -- bugfix for some nullpointer issue.
    • v1.0.2 -- support for BukkitPermissions
    • v1.0.1 -- Rewrote some code to improve speed.
    • v1.0 -- Fixed looking at redstone wire bug, added OddItem support, added LWC protection
    • v0.5 -- Double chest fix (Duh! for me), auto refill command
    • v0.4b -- Fills the dispenser with items in the adjacent chests, if possible, then completes with the player's inventory. Doesn't work with adjacent double chests.
    • v0.3 -- Fills from the player inventory
    • v0.2 -- Added support for chests
    • v0.1 -- Initial release
     
    thefowles1 likes this.
  2. Offline

    tdog158

    Nice

    Actually can you change /fill and /refill to /dfill and /drefill? It isn't compatible with WorldEdit, and I need WE a bit more :\

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

    Specops343

    Wouldnt WE use //commands? @tdog158
     
  4. Offline

    Nitnelave

    Sure, I'll change them in the next release. I didn't think about conflict with other plugins.
    EDIT: secret update, changed it. Re-download @tdog158 .

    Updated the post to talk about permissions.

    Updated to 0.3 : Now fills the dispenser with your inventory unless you have the permission (or you are an OP). Question : in OP mode, should everyone be able to use the command (it only becomes a way to quickly fill the chest with your inventory, no item creation)?

    Updates to v0.4 to allow re-filling from adjacent chests. Doesn't work with double chests, because of this.
    I may need testers, if anyone is interested?

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

    tdog158

    I'm home all day tomorrow, just send me a message on skype @ tdog158 when you need testing.
     
  6. Offline

    Nitnelave

    Well, can you test the current version 4b and see if it works? Remember to rename the jar. I didn't have time to test all the permissions, but that part should be ok. You should test the /refill command, I only tested the /fill. it should fill the chest/container with the first item it can find, drop whatever was in the chest before on the ground, and if it is a dispenser, take from the adjacent chests (not double) before your inventory.

    Ok, I have 2 questions for the public : first, I'll repeat my previous one :
    In OP mode, should everyone be able to use the command (it only becomes a way to quickly fill the chest with your inventory, no item creation)?
    Second, I'd like to know if you'd want the auto-refilling chests and dispensers to be refilled with one id specified when the command is run, or if it just runs the /refill command (taking in account your permissions at the time you typed the command)?
    So basically, do you type /dautofill <id> or /dautorefill? or do you want both? It will take in account your permissions at the time you run the command (whether you're allowed to spawn items or if you have to take them from chests around).

    Updated to v0.5 Added the auto refill, and double chest support next to the dispensers.

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

    Nitnelave

    Woooo! 1.0! Final update (until somebody posts a bug or a feature request...) Thanks for ... all of you ... to have followed this plugin... :'(
     
  8. Offline

    tdog158

    Awesome, going to be testing chests once I get my permission re-written.
     
  9. Offline

    Swifty

    Commands in the description need updating to /dfill etc
    plugin works great though :)
     
  10. Offline

    Nitnelave

    Oh, thanks, I didn't see that ^^! Glad to see everything works out! If you have any suggestion, I'll welcome them.
     
  11. Offline

    Swifty

    Hmm, well the only thing I could think to add would be to empty chests/dispensers with a command such as /dempty
    Just an idea :)
     
  12. Offline

    Nitnelave

    And it would drop the contents on the ground, unless you're an OP, in which case they would just vanish? Quite easy to do. I'll look into it soon, I'll tell you about it.
     
  13. [WARNING] [DispenserReFill] Could not rewrite file refill.yml


    i keep getting this message. i have all options reflecting logs set to false. quite frankly in the time that ive had this my log has gotten to be 62 mb. if you had a fix it would be amazing :)
     
  14. Offline

    Nitnelave

    It means that there is an error in the process of rewriting the file... Can you try and delete it? if you're on linux, do you have permissions set so that anyone can edit/delete the file? I'll look at my code, but I don't think the issue comes from there.

    Well, I have more details. The plugin can't delete the file. Is it already created? check for that, please.
    I rewrote the rewriting part of the code, and now it should send those errors WAY less often, if ever. It should be more efficient at refilling chests/dispensers.
    so, VERSION 1.0.1 IS OUT!

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

    Wiqkszon

    Error! :(
    HTML:
    16:42:13 [SEVERE] java.lang.NumberFormatException: For input string: ""
    16:42:13 [SEVERE]       at java.lang.NumberFormatException.forInputString(Unknow
    n Source)
    16:42:13 [SEVERE]       at java.lang.Integer.parseInt(Unknown Source)
    16:42:13 [SEVERE]       at java.lang.Integer.parseInt(Unknown Source)
    16:42:13 [SEVERE]       at com.nitnelave.DispenserReFill.DispenserReFill.refill_
    auto(DispenserReFill.java:759)
    16:42:13 [SEVERE]       at com.nitnelave.DispenserReFill.DispenserReFill$1.run(D
    ispenserReFill.java:135)
    16:42:13 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(Craf
    tWorker.java:34)
    16:42:13 [SEVERE]       at java.lang.Thread.run(Unknown Source)
     
  16. Offline

    Nitnelave

    I think you did /dautofill without arguments. I'll add some checks in the next version, but you should check your refill.yml, and see if a line is not missing a value. If you can't find it, you can post it here, or just delete it (but you'll lose all the registered auto-refilling dispensers)
     
  17. alright thanks
     
  18. Offline

    Wiqkszon

    Hey! Thanks but i just download again the jar file and it works :D
    Love this plugin :p
     
  19. Offline

    aDiii_

    Hey! Great plugin!!! I love it!!!

    There's just one thing...

    wanna use your autofill-function for my shops so i never have to fill them...
    but when i do so, the users aren't anymore able to SELL to my shop because its full...

    so the thing i wanted to ask you:
    Could you add something to your commands like /dautofill <item or name> <value>
    so for example i type "/dautofill glass 64" so that there is always 64 blocks of glass in the chest?

    would be great if you think about that ;)

    NICE WORK!!!
     
  20. Offline

    Nitnelave

    It would take a complete rework, but I guess I could... Like, on first slot, there ALWAYS is a glass block, then you can specify on second slot ALWAYS a dirt block, and so on... I don't know if I'll have time, but watch this thread for any update.;)

    Or maybe I'll make a new plugin for this, perhaps using bukkitcontrib? I'll post here.

    If I do like /dslot <item or name> <value> <slot number (optional, otherwise first free found)>
    and it is an admin only command, how about it?
     
  21. Offline

    aDiii_

    thats exactly what i ment... except the slot number... i for myself dont think that this is useful... cant imagine what the sense of this function would be ^^ but its your decision... youre the coder xD
     
  22. Offline

    Nitnelave

    Well, the slot would be so you can organise your chests the way you want, and anyway i'm going to use it, so why not propose it? I'll try and do it tomorrow, or maybe tonight.
     
    aDiii_ likes this.
  23. Offline

    esuni

    so are you saying there aren't any plugins that can auto refill chests that contains different amount of different items at once?

    or if its possible with this plugin plz answer me
     
  24. Offline

    Nitnelave

    Well, you can look for infinichest, I think that's the name, and it should do what you say (no guarantee here), but it will be possible in the next version of this plugin, when (and if) I have time to code it.
     
  25. Offline

    selonianth

    It won't let me use any of the functions at all. Keeps telling me I don't have the permission to do it and I know i do.

    I'm using Permissionsbukkit and Superperms.
     
  26. Offline

    Nitnelave

    Not updated yet to SuperPerms. Are you an OP? I think the new system might have screwed up that too.
     
  27. Offline

    selonianth

    I'm both Op and Admin.
     
  28. Offline

    Nitnelave

    Well, in the next update, to come maybe friday or wednesday after that, bukkit Permissions will be supported.
     
  29. Offline

    selonianth

    not bukkit permissions. That's the one built into it. this is PermissionsBukkit. It's a plugin all its own.
     
  30. Offline

    Nitnelave

    But it uses bukkit permissions. Just wait until tonight (probably) and an update should come out solving your problem.

    Ok, here you go, new update just for you!
    v1.0.2 is out!

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

Share This Page