Area-specific inventories

Discussion in 'Archived: Plugin Requests' started by EmVee, Apr 13, 2011.

  1. Offline


    WorldEdit/Cuboid for hMod used to have this in-dev feature that allowed admins set up inventories that were specific for certain defined regions, but it never came to fruition.

    So I was wondering if someone could possibly revive this feature as a separate plugin? I know there's already MultiInv for separate world inventories, but my particular needs are bit less general.

    It could work something like:
    • Define region using the usual method (i.e. with a tool of some sort)
    • Possibly, for consistency, extend the selection from sky to bedrock automatically.
    • After that, the admin could use a series of commands to define what items would be given to the player upon entry of this area.
    • Possibly store the player's inventory in an SQLite database temporarily, for persistence between resets if they happen to log out of this place in the time that they're here.
    • Maybe add an option for admins to allow people to keep what they gain upon exit (as in, minus what they obtained upon entry. i.e. you give them a diamond axe in an area full of trees and upon exit, they can keep all of the logs, but they lose the tool) by comparing what they had over what they have upon exit.
    • Upon exit of the area, the player's stored inventory would be returned.
    • Other security features to prevent duplication (having a difficult time thinking of this at the moment)

    I tried to do a PvP arena on one of my old worlds back in the hMod days and it would have worked well if this feature was enabled. Hope someone can take this up.
  2. Offline


    I would love to see one of these also, I would like to put a sprite area with free wool :D but don't want them to take it outside this area...
  3. Offline


    I'm writing a plugin now that does this plus several other advanced region control features such as saving and restoring content. I hope to have it ready within a month.​
  4. Offline


    I would also like to have a way to set certain players inventories to creative mode in a certain area so they can spawn items there but it shouldn't be possible to take these items outside the area.
    I hope this is possible or already exists.
  5. Offline


    Sorry - I've put my plugin on hold indefinitely. Too busy @ work. I may re-visit the idea after MC goes gold unless someone beats me to it.
  6. Offline


    kk it's no problem
    but other plugin developers could still give it a try :p
  7. Offline


  8. Offline


    How did you manage to store the changes to the map? I have been looking into developing a plugin that restores an area every few hours (like a warzone/battleground) but I am stumped when it comes to saving an area of the map temporarily.

    Sorry to COMPLETELY hijack your thread there. Anyway this would actually be very easy to do if you just based it around the worldguard/worldedit plugin. Would you want it to be completely independent of those two plugins, because the basic code would be:

    public boolean isWithinRegion(Player player, String region)
        { return isWithinRegion(player.getLocation(), region); }
    //save current inventory to textfile or database
    //clear inventory
    //create newinvent text file
    if(!isWithinRegion(player,region) & newinvent text file exists)
    //restore old inventory from textfile/db
    //add newinvent to old invent
    //delete both textfiles
    Probably a much better way of doing this, I will look more into worldguard and see if there is a upon entry/exit of the region.

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


    You could also have a text file for the invent they get in the area
  10. Offline


    Bump :) Id really like to see this working. Im making a place on my server called Redstone Heaven. Its a place where people can make or try out redstone designs theyve made. But I want them to clear their inventory before they enter or leave, so they cant take any of the free stuff with them when they leave the place. So yea, any developers who can make this, please do :D And please make it work with WorldEdit and WorldGuard :D

Share This Page