[INACTIVE][MECH]RemoteChests 1.5 - Access your chests remotely [Permissions&iConomy] [718]

Discussion in 'Inactive/Unsupported Plugins' started by ThaPear, Apr 5, 2011.

  1. Offline

    ThaPear

    RemoteChests - Access your chests remotely
    Version: v1.5

    This plugin allows you to access your chests remotely via commands or linking.
    Chests you create can be accessed only by you, unless you allow other users via command.

    It now supports permissions, if permissions are not present, everyone will be able to use remote chests.

    It now supports iConomy as well, allowing you to set a price for all commands
    If iConomy is not present, everything is free

    Features:
    • Access your chests remotely using commands
    • Link multiple chests to your remote chest
    • Right clicking on a linked chest opens the corresponding remote chest
    • Chests, Owners and allowed users are saved through server restarts
    • Only chest owners, or specifically allowed users can access your chests
    • Permissions support, without it everyone can use chests (when allowed by the owner)
    • iConomy support, commands can be priced, without iConomy, everything is free.
    • Sign location is changeable in settings.txt
    • Limited amount of chests per player
    • [player] is substituted for the interacting player's name
    Disclaimer: Since I am a lonely coder (in a dark corner somewhere) I cannot extensively test all features of this plugin. So please forgive me for any bugs/errors in the plugin.
    When you encounter bugs, please let me know by copy-pasting the error from the server console.
    Download Jar

    Source@GitHub
    I'm ok with you using code from here, if you credit and notify me.

    See images below for chest linking examples.
    Chest Linking (open)
    To link a chest block to a remote chest, place a sign above it with [rc] NAME on it. The NAME can also be placed on the next line.
    It will automatically search for an existing remote chest with that name and link to that.
    If the target chest does not exist, it will be created.
    Any items in the original chest block will be transferred to the remote chest. (When linking and when creating)
    Items will be auto-stacked when transferred. If they still do not fit, they will be dropped.
    Show Commands (open)
    [arg] = Optional argument:
    /rchelp - Show commands in-game
    /rcopen <name> - Open aremote chest
    /rccreate <name> - Create a remote chest
    /rcremove <name> - Remove a remote chest (ALL CONTENTS WILL BE LOST)
    /rcrename <oldname> <newname> - Rename a remote chest, items will be copied to target chest.
    /rcsort <name> - Sort the contents of a remote chest by item id.
    /rcstack <name> - Stack all stackable items to 64
    /rclist - Lists all remote chests. If more than 18 exist, you can specify page to see further down the list.

    Usable only by chest owners:
    /rcallow <playername> <chestname> - Allow specified user to access specified chest.
    /rcdisallow <playername> <chestname> - Disallow specified user to access specified chest.
    /rcsetowner <playername> <chestname> - Transfer ownership of specified chest to specified player

    /rcmerge <chest1name> <chest2name> [newname] [flags]
    Merge 2 chests, when no new name is specified, <chest1name> is used
    Show Flags (open)

    I - Ignore overfilled chests, items will be lost
    SWF - Auto-stack contents if target chest becomes overfilled
    O - Auto-overwrite target chest, needed if newname is already a chest and not chest1/chest2, items in target chest will be lost.
    AM - Auto-merge with target chest, same context as O, but merges all 3 chests (auto-specifies SWF).
    S - Auto-stack contents before merging
    SS - Auto-stack contents before & after merging
    Permission nodes (open)
    Admin = "rc.admin"
    Open Linked chests = "rc.linkedopen"
    Free chest creation = "rc.freecreate"
    Free chest linking = "rc.freelink"
    Unlimited amount of chests = "rc.unlimitedamount"

    Commands:
    /rcopen = "rc.open"
    /rccreate = "rc.create"
    /rcremove = "rc.remove"
    /rcrename = "rc.rename"
    /rcsort = "rc.sort"
    /rcstack = "rc.stack"
    /rcmerge = "rc.merge"
    /rclist = "rc.list"
    Owners/Allowed (open)
    Players now own the chests they create, and no-one can access their chests unless they are allowed to do so by the owner.
    The owner can use the command /rcallow <playername> <chestname> and /rcdisallow <playername> <chestname> to allow/disallow a player access to the specified chest.
    The owner can also transfer ownership to another user by using /rcsetowner <playername> <chestname>.
    Admins can access all chests & change owners/allowed.
    Settings (open)
    Run the plugin once, it will generate settings.txt
    Possible settings:
    (don't place spaces in the settings.txt file)
    signlocation:up - The location relative to the chest that the sign needs to be (up/down/north/east/south/west)
    tagplayer:[player] - The tag that will be replaced by the player's name
    maxchestsperplayer:10 - The maximum amount of chests a player can own
    chestcreateprice:0 - The iConomy cost for creating a chest
    chestlinkprice:0 - The iConomy cost for linking to a chest (using a sign)


    An example of multiple chests linking to the same remote chest.
    This is an image of my base on the sea floor.
    [​IMG]
    This is an image of my base at bedrock.
    [​IMG]
    Those 8 chests link to the same 4 remote chests, allowing me to access those chests from either location. I can also access those chests with for example /rcopen dirt or /rcopen stone.

    Changelog:
    Version 1.5
    • Added option for cost for all commands
    • Changed settings.txt handling. <----- SERVER ADMINS
    • Rewrote lots.
    Version 1.4
    • Added cost for sign linking
    • Added free chest/sign linking permission
    • Added sign location setting
    • Added limit to amount of chests a player can own, and permission for unlimited
    • Added cost for sign linking
    Version 1.3
    • Added Owners/Allowed
    Version 1.2
    • Added iConomy support
    Version 1.1
    • Added Permissions
    Version 1.0
    • Initial Upload.
     
  2. Offline

    iPhysX

    Great job! I'm going to test it soon :F
     
  3. Offline

    Jake Auditore

    Very nice indeed! Trying it out now!
     
  4. Offline

    fregman

    permission support would be great :)
    awesome plugin!
     
  5. Offline

    ThaPear

    Added permissions :)
    If you have any problems, please let me know.
     
  6. Offline

    iPhysX

    You could charge people iconomy for creating a chest? :D
    Permissions is great
     
  7. Offline

    ThaPear

    Added iConomy support, you can now set a price for creating a chest. :D
    Again, if you have any problems, please let me know
     
  8. Offline

    huadianz

    Can you add an ownership flag? So that you can only open your own chests, unless you have the admin permission?
     
  9. Offline

    bjoen

    does this work with chest locks like lockette?
     
  10. Offline

    anon

    I really would like to ask you for a thing. Could you add the option to allow the sign to be under and not on top of the chest? Because, many store plugins use that space over the chest, so if your sign could go under the chest, it would be a great and very simple way to refill your shops.

    Please think about it [​IMG]
     
  11. Offline

    ThaPear

    Done. :)
    Don't know, I'd say try it :)

    Will be in the next version. :p
     
  12. Offline

    huadianz

    Great plugin. Thanks very much. Just a few little quick things if you don't mind =)

    A 'rc.free' permission for ignoring the cost would be great, as well as a cost for creating physical linked chests, not just virtual ones.

    Also, maybe a way to have "instanced" chests would be great.

    What I mean is, say I have a bank, with a vault. In that vault, I want people to be able to deposit items, and be able to retrieve them from ANY other bank, but ONLY banks, not their own homes. So, basically, people cannot create chests linking to these RemoteChests, but the admin can. However, when they open the chest in the vault, they should access their own "instance" and not everyone else's chests. If this is too complicated, then please ignore it. I might code it later myself and submit a pull to your git.

    The final thing, is probably "limits," so people don't make 200 chests linking to 1 remote chest, or conversely, just 200 remote chests.

    I can implement these myself and submit pull requests if you would like =)
     
  13. Offline

    _LB

    Cool! Does this work with DropChest? I can't test now because the latest version of DropChest gives me infinite error spam >_>

    Also: why signs? Aren't chat commands easy enough? Signs are such a hassle that I avoid plugins that rely on signs JUST to function at a minimum. Using chat commands is much easier - plus, you're already saving data anyway, there's no reason you can't save more...
     
  14. Offline

    ThaPear

    I'll have a look at all of those, shouldn't be too hard.
    No, because that uses the physical chest, and this bypasses that.
    Signs are optional, you can also just use the chat commands.
     
  15. Offline

    PowerSet


    Definitely onboard with this.

    I would feel like it would be abuse being able to make a chest anywhere to link with other chests(practically like having infinite backpack space and having no fear of dangerous exploration)

    But I would absolutely love to have a bank system , not overly worried about having a single chest that allows everyone accessing their individual remote chest(although I wonder perhaps if a different version of this could be coded something like chest x leads to -current player- chest y), but even without that it would be nice to have a room with one chest per player, all linking to their own chests in a remote location, and allowing either one renote chest per player, or having admins fully control the creation of remote and linked chests.

    Sorry if I ramble too much, my best thought and probably easiest coding would be to just set a permission to allow a specific group to create chests, while still allowing all groups or other groups to access created chests, and if it works(worked) with chestlock all the better, or perhaps a an lock/password ability.


    Either way as is this is still a great plugin, so thanks for all the work you put into it!
     
  16. Offline

    huadianz

    People would not have infinite space or elimination of danger if there is a cost for creating physical linked chests, cause then every time they make a chest it will cost them money.
     
  17. Offline

    ThaPear

    Well, I'm done. :p

    There is now a cost to creating sign links.
    There is now a limit to the amount of chests a player can have.
    There is now an option for the location of a sign (up/down/north/east/south/west).
    There is now a tag option, allowing you to set a string to be replaced with the player's name.
    There are now permissions for free chest creation/linkage.
    Probably something else I forgot to mention as well...
     
  18. I have a question, is it possible to add a setting which only allows ddeposit items in one chest ?

    It could be cool, if a big project need a lot of sandstone, we can make a linked chest in each cities, and people can deposit items in, but not take some. Do you understand ?
     
  19. Offline

    ThaPear

    Yeah I get it, I'll have a look at it. Unfortunately I have an exam week coming up, so it might take some time...
     
  20. Offline

    PowerSet

    Even if I did plan on adding iconomy(which i don't so cost is not really an ability) People could still simply save up a bit of money, have a full chest every time they need it with them while being stored in a safe location, , so it does still take quite a bit of danger out, and add quite a significant amount of space, as I personally have never needed more than two double chests and my inventory when exploring even more than one cave system.

    It really would be nice to at least have an option to make linked chests only able to be created by admins. It's very hard to imagine that telling server going players that you only want them to make linked chests in specific locations to keep with a bank style.


    Actually looking at it a little more I guess I can just manually allow specific users to specific chests, and just create them all myself and not allow other users to create. sorry for not looking into it deep enough.
     
  21. Offline

    ThaPear

    Ah yea, absolutely forgot about linking permission, will be in next version.
     
  22. Nice job, I was thinking about making a plugin like this if it didn't already exist. It was only going to link chests though and only through commands (no signs ... I personally don't like sticking signs everywhere with [] tags on them). So all stored in a file or sqlite. It was then going to output it's name (and owner) on opening. I had it all planned out... it was going to be called TravelChests.

    Look like you beat me too it... + you've added the remote opening feature (another idea of mine... but without the chests, just multiple inventories).

    Plus, the multiple instancing of a single chest may be a tad harder than you think (assuming you wished to do his banking method). Because you don't have a separate chest for each player now you have to be able to store them. And it's the storing over restarts that requires persistence of inventories which is really annoying. If anything, I think that should be it's own plugin... called "ItemBanks" or something similar.
    And on that note: If you want to make this you're free to nab my code for storing inventories (unless you have another plan). Just look up my github. Else I might make it... I'm giving the option to you though.

    But this is a nice plugin and I'm glad that someone else had thought to make it.
     
  23. Offline

    ThaPear

    This plugin already stores inventories over server restarts. :)
     
  24. And I have now found said code in your source... a tad too compressed for my tastes (nowadays that files size matters less). You went about storing all the integers in an array. I stored them in a custom objects (that I'm working on to store entire inventories) in an api style manor. But it's nicely done and very compact your method.... especially as mine creates a new class...

    I was going to make a nice simple api to store inventories of any block or player (in a class that anyone could use... mainly me in other plugins)... but I've realized that I have to work out how each blocks inventory is set.... so currently it will only work for players...

    + I thought that this only let you open a "remove inventory" of an existing chest. Missed that it could store virtual inventories. I still think that the bank mode should be a separate plugin though. It seems so different from this so you may want to release it either as a "sub plugin" or a "standalone plugin"
     
  25. Offline

    beecub

    Could you add an command (with permissions) to add items via commands to chests?
    Example:
    /rcadd 1 64
    So this will add 64 cleanstones to the chest.

    Really nead this ;)
     
  26. Offline

    grinch843

    How about accessing the chest with just a sign?

    I've got a room where all of our storage chests are but we've run out of space to add more chests, can't expand due to other structures around the room. What I would like to do is make a another room somewhere off the beaten path that I can put all our chests in, then attach a sign to a chest, then go to our main storage area, place another sign on the wall and have it linked to a chest in the other storage area, then when we hit the sign it would open the chest linked to that sign. This would also make organizing a storage room easier, if you want to move or re-order anything just break a sign and move it, a lot less hassle then moving the contents of one chest to another. Also, you don't have to worry about what the room with the actual chests looks like, just dig out a cave somewhere and start dumping chests, if ya run out of room, expand the cave.

    Would something like this be possible?

    Thanks,
    Grinch843....
     
  27. Offline

    huadianz

    Is this updated for 700+?
     
  28. Offline

    cholo71796

    Anybody know if this is compatible with RealShop? That would make for some epic server trade in stuff.
     
  29. Offline

    ThaPear

    It is now :)
    Don't know, I'd say try it.

    Updated for CraftBukkit 718
    Added options for costs for all commands.
    Rewrote lots of code, so bugs are bound to occur. Just post them here and I'll fix them.
     
  30. Offline

    Tester

    What's about large chests? On your Pictures are two large chests and four signs. Is there a way to use one sign for both chests wich forms a large chest?
     

Share This Page