Keep Inventory upon death if...[FORMATTED]

Discussion in 'Archived: Plugin Requests' started by iwbtg231, May 6, 2012.

  1. Offline

    iwbtg231

    Plugin category: Mechanic-altering

    Suggested name: How about we use the dev's name, and then add something catchy on the end of it, or better yet the beginning? And I'll work hard to make sure everyone knows how kind you are for helping a stranger.

    A bit about me: I'm a late college student with 3 little old creative servers, and I have lately been working on a wonderful survival server that plays a little with game difficulty and player priorities, and apocalyptic scenarios.

    What I want: A plugin that will allow players to keep their inventory when they die, assuming that they have the correct item. It should also consume the item. In the config.yml it would be great if there was an option to change which item is consumed upon death in order to keep their inventory. Sponge would be a great default.

    Ideas for commands: Can't think of any

    Ideas for permissions: I don't see a need for that.

    When I'd like it by: :) Depends on how difficult this is for you

    Similar plugin requests: None.
     
  2. Offline

    recon88

    I'll do that =)
    What if they don't have the needed item (e.g. 1 sponge)? Should it drop the inventory or delete it instead of keeping it?
     
    iwbtg231 likes this.
  3. Offline

    Tim619

    Of course you do, what happen if you don't want this person to even have this features for him or her. That why you have permissions.
     
  4. Offline

    recon88

    His decission.. Maybe he wants it for everyone and not just for some groups.
     
  5. Offline

    iwbtg231

    Wow! I got a response!
    Ideally, the inventory would drop normally if they didn't have the item. Because sponges are unobtainable, it acts as a tangible and trade-able "life" and I can start giving them out.



    If the plugin works the way I'm hoping, this also means that there is one item on my server that no one can take away from you. They can make you lose it, but then you get a free teleport to safety and get to keep your inventory.

    Absolutely. You're 100% correct. But in my case, I would just not give that person a sponge.
     
  6. Offline

    Tim619

    Oh really, what would happen if you gave this player(player1) a sponge, and an another player(player2) buys it off him?
    The end.
     
  7. Offline

    iwbtg231


    What end? What harm could come from a player willingly giving the save to another?
    I guess I could elaborate if this really interests you. Under normal circumstances, death in minecraft means you have to find your inventory before it disappears. But my server employs a deathban. By participating in events, or finding the hidden treasure, they attain the ability to keep their inventory on death. If the plugin works, the item can be traded (for a high value I'm sure) but not stolen. So why would I ever want to deny that privilege to anyone on the server? ​
     
  8. Offline

    recon88

    https://www.dropbox.com/s/relht2i8gmmexcl/KeepInv.jar

    There we go.
    Saves the inventory of the players. If they die it will check the inventory for the needed ItemID + Amount.
    If they can provide the ID + Amount it will deduce it and restore the inventory. Otherwise it will drop all the items.

    Configurable!
    No Permissions!

    Edit:
    I'll make a BukkitDev page if you confirm that it is working =)
     
    cooldudef40 likes this.
  9. Offline

    trusebruse

    I like it! but there should be like if you die in a safezone you save your things but if you die in a pvpzone you lose em... :)
     
  10. Offline

    recon88

    You can request that if I'll make the BukkitDev page...
    Currently I'm making this plugin just for iwbtg231
     
  11. Offline

    recon88

    Last seen on thursday :/

    Question: Do you use vault/economy to sell that needed item or do you want me to add a command to exchange items?

    E.g.:
    /ki buy - Removes 10diamonds from your inventory and adds 1 sponge (all values configurable ofc)
     
    cooldudef40 likes this.
  12. Offline

    cooldudef40

    recon88, I would really like a BukkitDev Page for this plugin, as i think that this would be really useful and would like to see it updated in the future, and have a glitch reporting place. So if you could make a bukkitdev page for this that would be great:D. btw, can a borrow a [sponge]? i left mine at home:oops:.

    Edit, a couple of things:
    1. The plugin works :). I had 4 stone and it took them, told me, and kept my inventory.
    2. Can you add optional XP saving?
    3. Can you add a "item name" config option so it doesn't say "4x of the ID 1", but you can set the item name it gives in config, so it could be "4x of stone" or you could set the whole thing in config, like "%number&x stone" in config = "4x stone", and you can change it.
    4. Can i see the source? I am learning to write plugins and would like to see how you wrote this plugin.
     
  13. Offline

    recon88

    2. Maybe... But it's called KeepINV, not KeepALL ;)
    3. There's no need for changing the config stuff. I just need to convert the ID into MATERIAL. Nothing special.
    4. Basically I do not offer my sources. But feel free to decompile it if you want to look into it.
     
  14. Offline

    cooldudef40

    Thats cool, but if you could still respond to #1, that would be great :)

    its ok, I'm just always looking for ways to improve my plugin making skills.
     
  15. Offline

    recon88

    What should I respond to #1 ?
    You just said, that the plugin works. Well, I know :p
     
  16. Offline

    cooldudef40

    recon88
    sry, i meant put it on DevBukkit, but it does work, and you asked for it here:
    So that is what i meant by #1.
     
  17. Offline

    cooldudef40

    recon88
    Hello? are you going to make that BukkitDev page that you said you were going to make?
     
  18. Offline

    recon88

    soon..
     
  19. Offline

    cooldudef40

Share This Page