Inactive [ADMN] ChestRestock v2.0 - A simple way to restock chests and a unique way to give items [1.2.4-R1]

Discussion in 'Inactive/Unsupported Plugins' started by dumptruckman, Jul 4, 2011.

  1. Offline

    dumptruckman

    ChestRestock - A lightweight and easy way for server ops to make automatically restocking chests

    Version: 2.0

    ChestRestock 2.0 is ONLY avaiable at dev.bukkit.org

    This plugin will allow server ops to set up chests that automatically restock based on configurable parameters. This will allow you to create special chests for a variety of situations. You could create a chest for people new to your server containing a set of starter gear that they can only loot once. Or make reward chests in dungeons where you don't have to worry about them being empty. All kinds of things are possible!


    IMPORTANT!: In version 1.1 I had to update how the chest data was stored to make this plugin more multi-world compliant. As such, your current chests will no longer be configured. However, if you know how to work yaml files, you can edit your config.yml file and update it pretty easily. You just need to create another sub-category under "chests:" which will be "worldname:" to indicate which world the chests reside in. (Just make sure to put the name of your world instead of worldname)


    Features:
    • Automatically-restocking chests
    • Chests can either add to or replace their current stock
    • Configurable restock period
    • Can either be set to start timing based on the time a player last opened the chest or at specific intervals
    • Can be set to preserve the position of the items in the chest
    • *new* Configured chests will be indestructible by default with an option to disable said behavior
    • *new* Chests can be configured to limit the number of times it will restock for each player
    • *new* Restock chest by command
    • *new* Full multi-world support
    • *new* Chest naming
    Download ChestRestock
    Source Code

    There is lots of help available in game! Type "/chestrestock" to see a list of sub commands and "/chestrestock help" to learn more about the plugin.

    Instructions
    • Place ChestRestock.jar in your plugins folder.
    • Start or reload your server.
    • Type /chestrestock while in game
    • Or target a chest and type /chestrestock set
      • This will set up the chest with default settings (adjustable in config.yml) and will restock with the items currently in the chest.
    Changelog:
    Version 1.1
    • Added option to make chest indestructible to anyone but ops. This will also cause explosions that hit them to be cancelled completely.
    • Added option to make chests lootable only X amount of times by each player.
    • Added a reload sub-command to reload the config file.
    • Added a restock sub-command to immediately restock a chest.
    • Added better multi-world support. Unfortunately this WILL break existing configurations.
    • Added ability to give chests a name. This should make it a little easier to find them in the config file.
    • Fixed bug that caused chests in replace mode to add items instead.
    Version 1.0-Beta
    • Initial Release!
    Todo:
    • Permissions support
    • Redstone restocking
    • Pretty up the in game text
     
    Ushlak, buckZor and scrub88 like this.
  2. Offline

    BigRenegade

    Currently have this running and it is amazing! Definitely helps save time when chests are constantly depleted by other players. Keep up the good work!
     
  3. Offline

    Bdl2

    This is *exactly* what I need. I have a bunch of dungeons on my server with chests scattered around, but one playthrough in one would make it so nobody else got the chest rewards. Now, everyone will get something for their effort.
    Thank you for making this!
     
  4. Offline

    dumptruckman

    Haha, this is exactly why I made it. ;)

    edit: if you want any more options let me know. I'm gonna try and add redstone powered restocking as one option
     
  5. Offline

    Bdl2

    Honestly this works perfectly for me as-is. The redstone thing could be useful though!

    Though, just now writing this I do have an idea. I personally wouldn't need it, but maybe have a setting that disallows use of the chest after opening once to prevent camping for restocks? Possibly with a cooldown timer after opening that allows the player to re-open the chest after it's been restocked x amount of times. (On a per-user basis, obviously.)

    Bah, ignore me, I think I'm talking about something that'd be a whole different plugin altogether.

    Still though, great plugin, you're my hero. <3
     
  6. Offline

    dumptruckman

    Actually, I was planning on something like that.. Basically, allowing for a player to only be able to have it restock for them X number of times.
     
  7. Offline

    Bdl2

    Oh, well, one more thing, maybe add optional destroy protection? I haven't toyed around with this on my live server yet, so if that's already a part of this, my mistake.

    I seem to be full of more ideas than I thought. x3
     
  8. Offline

    dumptruckman

    What do you mean? Make ChestRestock chests indestructible? Shouldn't be hard. :)
     
  9. Offline

    Bdl2

    Pretty much. Either that or make them respawn themselves on restocking. Both seem like viable options to me. :3
     
  10. Offline

    dumptruckman

    Well, the first idea is more likely.. As the respawning items is actually never checked unless i player opens the chest. I did it that way to avoid using a unique timer for every chest which I would imagine could bog down the server in extreme cases.
     
  11. Offline

    Bdl2

    Then go with the first one. ;3

    Also, on an entirely unrelated note, I have a question for you regarding plugins. I recently had the idea for a plugin that actually modifies the blast resistance of specified item IDs to make them react to explosions much the same way that obsidian would. (In other words, wouldn't be destroyed.) But, I don't know if Bukkit is capable of altering blast resistance like that. If it's possible I'll have to find some way to spontaneously teach myself how to make plugins. xD
     
  12. Offline

    dumptruckman

    Hmm, considering this is my first plugin, I'm not entirely sure... But also, considering how other plugins handle creeper explosion prevention, I doubt it. But, if you know Java at all, it's really simple to make a plugin. There's a newer tutorial up now that really helped me out. I also cross referenced ScrapBukkit for additional hints.
     
  13. Offline

    Bdl2

    I've really wanted to dig into it for a while but I've been afraid to get my feet wet in something I know nothing about. I've got loads of ideas, though. xD Maybe I'll give it a shot, I did download NetBeans and the appropriate SDKs and what have you a while ago...

    And for your first plugin, this is surprisingly well made. I've seen much lower quality things come out of more 'experienced' developers. Definitely going to be keeping an eye on anything else you put out in the future.
     
  14. Offline

    dumptruckman

    Heh, thanks! Notice my sig, MC Server GUI. Make managing your server a breeze. :D
     
  15. Offline

    Bdl2

    xD I actually used that for a while when I first started using Bukkit, but later on found that it didn't work with my old vanilla fave SimpleServer wrapper. I haven't really tried it out in a while though, maybe directing the GUI to SimpleServer's jar would work now.
     
  16. Offline

    dumptruckman

    It does. However, it may not work with the GUI's Proxy... I'm going to be implementing something to fix that issue though because it's causing issues with more than just SimpleServer
     
  17. Offline

    scrub88

    please please please get this to work!
    please :p if you could get that to work this plugin would be so helpful! atm people can just spam what spawns in it xD ty!
     
  18. Offline

    dumptruckman

    @Bdl2 and @scrub88
    1.1 is released. Contains all requested features and more.
     
    scrub88 likes this.
  19. Offline

    Bdl2

    Awesome, good stuff man!
     
  20. Offline

    dumptruckman

    Yeah, but I realized material data doesn't work! I fixed it in the next version though.
     
  21. Offline

    scrub88

    I put in lapis lazuli and it restocked ink sacs xD
     
  22. Offline

    dumptruckman

    Yeah, I know >.< It'll be fixed in the next version :)

    edit: It IS fixed in the next version.
     
    scrub88 likes this.
  23. Let me just say i absolutely love this plugin its great for my creative and iConomy server but there is one problem. i have had it working for a few days and today it said that i do not have the permissions to access that command of /chestrestock. Any ideas. Btw i did use a backup but it was after i had implemented the plugin.
    my permissions are '*' so i should have everything and i double checked
     
  24. Offline

    dumptruckman

    This doesn't use permissions yet... I'm waiting on Bukkit Permissions to add that. It only uses ops.txt right now.
     
  25. ohhhhh i got it and i removed myself from ops bc someone kept using my name to greif. hahha my b thanks anyways
     
  26. Offline

    Logan deBC

    How do I set it so that a player can only loot it once? Which part of the config?
     
  27. Offline

    dumptruckman

    Well, the ingame command would be /chestrestock playerlimit #
    or you can use /cr playerlimit #
    You just target a chest you set up and use that command. You can edit the values in the config if you want but you'll have to figure that out for yourself :)
    The default is for chests to NOT have player limits... If you want to change the default it is in the config. It says playerlimit. -1 means no limit. Any number above -1 will set a limit for non-ops. Also, don't forget to use /chestrestock in game to see available commands.
     
  28. Offline

    Logan deBC

    Thanks, I was wondering if that option made it so that it would restock once for the whole server.
     
  29. Offline

    Smukkeoby

    Hi!, love the idea!! But have a big problem! It gives me an error, that i don't have the permisson to use that command, but im the ower of my server, and i've set my permissions to .* so should be abble to use all commands? Do you think you can help me out! Really want this plugin on my server! :) Thanks!
     
  30. Offline

    scrub88

    make yourself op.
    @dumptruckman - is the new version up yet? been away for 2 weeks so cant remember whats what xD
     

Share This Page