Lava Insurance

Discussion in 'Archived: Plugin Requests' started by Jenthura, Jul 10, 2012.

?

Good or no?

Poll closed Aug 9, 2012.
  1. Nice!

    100.0%
  2. Nah...

    0 vote(s)
    0.0%
  1. Offline

    Jenthura

    @- -MeneXia
    @'*'
    If at all possible, could you please move your discussion elsewhere? Thank you kindly.

    @MeneZia
    That looks perfect!
    My only addition would be another InsuranceGroups named group AllMobs.
    Also, every death has another option.
    returnworth: true
    Which, enabled, would return the combined worth of your items in currency. Also, it shouldn't be able to be used in conjunction with price: as that would let users get back both their items and their items' worth.
    I'm fairly certain this would require the plugin to be connected Essentials, so I'll understand if you can't do that.
     
  2. Offline

    Dark_Balor

    How would you calculate the "value" of the "lost items" ?
    To do it correctly it mean you'll need some conversion table for EACH item, because I don't thinks that economy plugins are doing it natively.

    What you could do is putting a price for special item (like diamonds) and a default price for the rest :)

    By the way good idea :)

    If MeneXia Dalek Master :p) Need any help it will be a pleasure :) (don't hesitate to PM me)
     
  3. Offline

    Jenthura

    Dark_Balor
    Essentials already has such a table, the worth.yml.
    Thank you for offering to help develop this!
     
  4. Offline

    np98765

    Awww. :(

    I liked the original idea, of getting your items back. You pay for the insurance with money, and then you get your items back, no money. -_-

    Ah well, 'tis your request. I won't change it. Just my opinion. :p
     
  5. Offline

    WarmakerT

    Stop going off-topic.
     
  6. It will be configurable; whether you want an items payback or a money payback.
     
  7. Offline

    Jenthura

    MeneXia
    Another thing I thought of, is it too late?
    An option should be in the config file for how often the player needs to pay his insurance. It should be configurable in minutes or minecraft days. Also, an option should be included for if his insurance payments continue to drain his money even if the player is offline. Although if that was true, then there would have to be some sort of provision for what would happen if he ran out of money.
    If this configuration is left as false, then the insurance would be a one-time-payment thing.
     
  8. Offline

    fredghostkyle1

    so where is the plugin? like LINK or something i liked this plugin. and it wou;d be nice for big servers, thanks
    BTW: is there premissions like this:
    DeathInsurance.Insurance- allows incerens with fee​
    DeathInsurance.NoCost - get items back with no paying​
     
  9. Offline

    Jenthura

    fredghostkyle1
    This is a discussion thread. The plugin currently under discussion is not completed yet. MeneXia is working on it; you'll have to be patient.
    Also, I'm fairly certain whatever permission nodes he chooses will be completely and easily usable.
     
  10. Jenthura and all others who are patiently waiting for the plugin:

    The plugin is about 90% done, however I won't be including money payback in the first release. I may include that in the future, however.
     
  11. Offline

    Jenthura

    MeneXia
    Thanks! I actually wouldn't use the money payback option myself. I only wanted it included for others who would.
     
  12. Jenthura and everybody else:

    Done! Download here: https://dl.dropbox.com/u/38070536/DeathInsurance/DeathInsurance-0.6b.jar (with source)

    Do note that this is a beta release, there still may be some overlooked bugs that need squashing. The plugin is quite explanatory in-game, however I'll take the time to explain some parts of the configuration:

    Each of the insurances in the config have a "Price" and "Retrievable" option. The "Price" is what you set for how much the insurance will cost for someone to purchase it. Once they purchase it, they have it forever until it is removed with the command: /di remove <insurance>. The "Retrievable" option is set to either true: if you want items to be retrievable on death, or false: if you want the items to be non-retrievable on death, meaning they dissapear if the player does not have an insurance.

    If the player does have an insurance, the items will not be dropped, and will be saved in the player's inventory upon respawn.

    For permissions: deathinsurance.* gives you:
    - deathinsurance.check
    - deathinsurance.list
    - deathinsurance.buy
    - deathinsurance.give
    - deathinsurance.remove

    Finally, for future plans: I will be spending more time on other plugin projects that I have worked on simultaneously with this project; until I have time to clean up code and formally release this on BukkitDev, any developer is welcome to build upon / alter this project and release it for themselves, as long as they credit me.
     
  13. Offline

    Tobias2189

    Would love to use something like this. I run a little personal private server for friends and family and my wife is always at HIGH risk to falling into lava. This would be great to help her! Please lets see this happen!
     
  14. Tobias2189 They already made the plugin, its up there its called
    death insurance
     
  15. Offline

    Jenthura

    MeneXia
    Thanks so much, man! I'm testing it right now; I'll be sure to tell you of bugs!

    EDIT: Okay, already found one.
    I bought lava insurance, killed myself in lava and got back my whole inventory. Yeah! Let's call that Inventory A
    I changed my inventory (Inventory B) and armor and killed myself a second time. However, this time, instead of getting Inventory B I was given Inventory A, which I had already put away.
    This bug allows duping of items, armor and tools. Obviously, my inventory was saved at one point and never re-saved.
    Is it possible to save the inventory every few minutes? Would that be too hard on a server? Is it possible to save the inventory the moment you take lava damage?
    Peace out!
     
  16. Fixed that bug, apparently I forgot to remove the old inventory from memory after the player died.

    Download DeathInsurance v0.61b here: https://dl.dropbox.com/u/38070536/DeathInsurance/DeathInsurance-0.61b.jar
     
  17. Offline

    Jenthura

    MeneXia
    Tested again.
    Unfortunately, I think there is new problem. Now, any commands I attempt merely return "15:21:04 [INFO] di" The first part is the server time.
    I tried all the commands, ones that worked before the items-dupe glitch, but to no avail.
    I'll have a look at my permissions and configurations, but I think the problem is with the plugin.

    EDIT: My bad. I tried to make a new group in the config (an 'All' group) and that seems to be the problem. I removed it and it works smoothly now. Lava-duping is now impossible. :D
    However, I don't see why I couldn't add another group. :?
    Show Spoiler
    Code:
       
    InsuranceGroups:
    # Create your own groups of insurances for a player to purchase at once
        NetherMonster:
            Price: 500
            Insurances:
                - ZOMBIEPIGMAN
                - BLAZE
                - GHAST
                - MAGMACUBE
        Undead:
            Price: 550
            Insurances:
                - ZOMBIE
                - SKELETON
        All:
            Price: 100
            Insurances:
                - ZOMBIE
                - SKELETON
                - CREEPER
                - SPIDER
                - CAVESPIDER
                - ENDERMAN
                - WOLF
                - SLIME
                - SPIDERJOCKEY
                - ZOMBIEPIGMAN
                - BLAZE
                - GHAST
                - MAGMACUBE
                - SILVERFISH
                - GIANT
                - ENDERDRAGON
                - PLAYER
                - TNT
                - CACTUS
                - DROWNING
                - FALL
                - BURN
                - LAVA
                - LIGHTNING
                - POISON
                - STARVATION
                - SUICIDE
                - VOID


    MeneXia
    One other thing I found.
    The command /di check [playername] doesn't work properly. If I try it in the command-prompt window, nothing happens. I found out that it is actually printing the list on the player's screen, rather than in the window. I think the fact that the player has the deathinsurance.check permission is the problem, but I'm not sure.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  18. I wasn't able to replicate your issue in v0.61b. Adding your own custom groups should work fine. Here's a sample config I tested, adding all insurances into a group called "All:" https://dl.dropbox.com/u/38070536/DeathInsurance/config.yml

    Make sure that you always use spaces in your config.yml. YAML files will always break and return errors if you use the tab character instead of spaces.

    Fixed that; it's not a matter of permissions, I must've messed up my coding :p
    Download DeathInsurance v0.62b here (with the above bug fixed): https://dl.dropbox.com/u/38070536/DeathInsurance/DeathInsurance-0.62b.jar

    Also, thanks for the feedback and your time to test the plugin; I really appreciate it. :D
     
  19. Offline

    Jenthura

    MeneXia
    What is the command to assign a group of insurances? I tried /di give [playername] all, but that didn't work. /di give [playername] undead didn't work either, and /di give [playername] group all didn't work.
    /di list group works, though, and it does list the 'all' group.
    I want to try each death to make sure there are no other bugs, but it seems very tedious to give and remove each one individually.

    EDIT: I'll be going to bed soon, you may not get a reply from me for another 12 hours.
    Peace out
     
  20. The command is /di give [playername] <groupName>
    I did see that when doing the command, it spat out a parsing error, so I did a quick fix on my group giving code. Check the download link below.

    Download DeathInsurance v0.63b here: https://dl.dropbox.com/u/38070536/DeathInsurance/DeathInsurance-0.63b.jar
     
  21. Offline

    Jenthura

    MeneXia
    Last post, I swear.
    It's still not working properly. But now, not even /di buy command is working. All I get is the "[insurancename] is not an insurance!" Even though I tried 'undead', 'nethermonster', 'lava', and 'LAVA'.
    I checked the config file but it seemed fine.
     
  22. Offline

    jakebake121

    I want, I need
     
  23. I wasn't able to replicate your issue in v0.63b, the /di buy <insurancename> works well for me, even with groups. Try posting your config.yml on here or on pastebin/pastie so that I can take a look at it?
     
  24. Offline

    Jenthura

    MeneXia
    I used the default config that came with the jar. I also tried the config you gave me, to no avail. I am also using v0.63.
    I'm going to try again (I'm not on my own computer right now) later, but with a clean server instead, no other plugins except DI and Essentials.
     

Share This Page