[MECH] DeathControl v2.1.0 - Take control over item deaths [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by Bone008, Jun 22, 2011.

  1. Yes you can copy and paste it, deleting only makes sure the instructions at the top get updated (since a couple of parameters were added). And make sure you don't keep any double aliases!
     
  2. Offline

    dbizzzle

    oh, okay and could you look at the edit in my last post please
     
  3. @dbizzzle
    Would maybe be helpful. I would set the messsages globally with wildcards though so you don't have to write everything over and over again.
     
  4. Offline

    Steelstiletto

    Little bit sad that the new version didn't include a whitelist. Any estimate on when that will be added?
     
  5. I'm working on it. Sorry, I'm not having too much time for coding right now. There's a project I have to finish until Wednesday. But I'm doing my best to get this forward.

    Wooooh, got a first version of a whitelist working!

    Update to v1.1

    Changes:
    • added whitelist functionality
    • fixed bug when items got lost when the player dies again within the timeout of a command
    • added default config.yml to the download
    Download:
    [EDIT: use newer link in the OP]

    A whitelist can be added with the following syntax in a death-cause definition:
    whitelist: [276,277,278,279]
    This would only keep diamond tools and let the rest drop.

    Have fun :)
    I will extend this further and make it more comfortable when I got more time.

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

    Tesseracto

    Yay, finaly!
     
  7. how can i make this to save all items in lava & void for certain amount of money?

    Code:
    DeathCauses:
        VOID:
            keep-inventory: true
        PVP:
            keep-inventory: true
            cost: 300
            method: command
            timeout: 10
            loss-percentage: 12.5
        LAVA:
            keep-inventory: true
            whitelist: [264]
    
    i have this there.
    if i put
    VOID:
    keep-inventory:true
    cost:500

    does this save inventory and take 500 currency?
     
  8. @Semirotta
    Yes, your example would do that (ofc with correct indents).

    Finished, it would look like that:
    Code:
    DeathCauses:
        VOID:
            keep-inventory: true
            cost: 500
        LAVA:
            keep-inventory: true
            cost: 600
    Or whatever costs you'd like to insert.
     
  9. Offline

    Steelstiletto

    Would it be possible to add a permission node that ignores the whitelist?
     
  10. I planned on adding more permission nodes to bypass various things. This is another idea for that, it will be implemented :)
     
    Steelstiletto likes this.
  11. Offline

    Steelstiletto

    Awesome, thanks!
     
  12. Offline

    Soulstormer

    Very nice plugin, I love it.

    Sugesstions
    Option 1: Player drops random items, which are on the whitelist, but keeps the rest.
    Option 2: Player drops random items, which are on the whitelist, and looses the rest.
     
  13. @Soulstormer
    Thank you :)
    Unfortunately, I don't really understand your suggestions. What exactly would you like to happen to the items on the whitelist?
     
  14. Offline

    Soulstormer

    At all there is no change at the whitelist thingy, sorry for the confusion.
    It's just the random drop and keep items or loose items which didn't drop.
     
  15. Offline

    chicagosandman

    Can you put in a feature so your items will be placed in a predefined chest? I know this is a bit O.T. with your plugin but I'd really, really like this and can't find any plugins for it.
     
  16. There are already enough plugins that do stuff like that. Take a look at Tombstone or its fork Cenotaph.
    And you can them in combination with this one.
     
  17. Offline

    chicagosandman

    No, I mean a chest that's PREDEFINED and doesn't appear where they die, but rather in a location set up beforehand. Whatever, it's fine if you can't do it.
     
  18. @chicagosandman Ah, now I got your point. Sorry, I kinda skipped the "predefined" in your first post :oops:
    Well, this plugin isn't chest-related so far (as you pointed out), but that doesn't need to stay like that ;)

    If you give me a little more detailed conception of what you want I could integrate it as an optional feature.
    How does "predefining" work? (admins or players?)
    Would there be a manually created chest for every player?
    How about cost? etc.

    I can't exactly imagine how you would like to use it, so that might be helpful.
     
  19. Offline

    chicagosandman

    @Bone008 No probs with the reading error ^-^. My idea would be this:

    When players die, their items are sent to a chest which are then available for pickup at any time. This chest would be predefined manually (if auto I guess it would be like Cenotaph), sort of like an lwc lock, by either admin or the player them-self or anyone with a certain permission node. I suppose you could configure it to cost a certain amount of $ (depending on kind of death) to send the items to the chest, or cost $ to actually assign a chest, or perhaps both.

    I think this would be a really great feature for anyone who:
    - has a RolePlay server (i.e. person playing a "Scavenger" 'finds' your stuff when they die, you pay him to get it back)
    - for some reason wants to spawn with a clear inventory
    - is evil and wants to harvest peoples' items easily
    - wants this feature :D

    I guess could kind of be a plugin within it self. :/
     
  20. Well yes, I thought of that too :p
    I might even code it that way, as an additional jar (DeathControlChestMasterWithSomeOtherAnnotatedWordsToMakeTheNameIncrediblyLong ;)) to get that feature.
    Or maybe it will be lightweight and separate enough to have it work in the main plugin.
    Talking of "it will": you convinced me to implement the feature, even if it's probably only because of the fun of programming it :D

    It could take some time though, I'll focus on the more related and easier fixes/improvements first - now that I've got time again.
     
  21. Offline

    chicagosandman

    Awesome! Can't wait to have it implemented! :D
     
  22. Offline

    Pyraah

    Hi,

    I've an error :
    Code:
    10:14:22 [SEVERE] Could not pass event ENTITY_DEATH to DeathControl
    java.lang.NullPointerException
            at bone008.bukkit.DeathControl.DeathCause.getDeathCause(DeathCause.java:70)
            at bone008.bukkit.DeathControl.DeathControlEntityListener.onEntityDeath(DeathControlEntityListener.java:31)
            at org.bukkit.plugin.java.JavaPluginLoader$56.execute(JavaPluginLoader.java:635)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
            at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:141)
            at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:43)
            at com.Balor.bukkit.AdminCmd.AdminCmdWorker.playerSetHealth(AdminCmdWorker.java:392)
            at com.Balor.bukkit.AdminCmd.AdminCmd.onCommand(AdminCmd.java:105)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:298)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  23. It looks like your player died without any regular damage (seems like something like a /kill-command to me). I didn't consider that. It's a really easy fix, but it shouldn't do any harm anyways.
     
  24. Offline

    Pyraah

    Yes, I've tried the /kill command. And on my server, I've the /suicide command. :(
    So, I prefer to use another plugin. Sorry.
     
  25. @Pyraah Ah, so you're using it frequently. Well I just pushed out the minor update to v1.11. Fixed it (were only a few lines).
     
  26. Offline

    morizuki

    Code:
    2011-07-08 02:10:39 [SEVERE] Could not pass event ENTITY_DEATH to DeathControl
    java.lang.NullPointerException
        at bone008.bukkit.DeathControl.DeathCause.getDeathCause(DeathCause.java:57)
        at bone008.bukkit.DeathControl.DeathControlEntityListener.onEntityDeath(DeathControlEntityListener.java:31)
        at org.bukkit.plugin.java.JavaPluginLoader$56.execute(JavaPluginLoader.java:635)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:141)
        at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:43)
        at net.krinsoft.simpleregen.SimpleRegen.healTask(SimpleRegen.java:116)
        at net.krinsoft.simpleregen.SR_Timer.run(SR_Timer.java:16)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)
    getting the error in end of stream.. we're still trying the end of stream error if it's fixed.. but it's not.. still the item still lost..
     
  27. Offline

    Tesseracto

    Request:
    Add percentage option on cost, so they can lose the half, or 10 percent or 1 or so.
     
  28. @morizuki Meeeeeh, I'm such an idiot. I apparently just changed the mistake to another line and checked for it afterwards :/
    Well, now it should work. Please just redownload it, version is staying the same.

    @Tesseracto You mean when they don't have enough money to pay the full cost they would still keep a slice of them?

    To everyone: Should I keep the loss-percentage-method as it is right now or change it to apply to stacks instead of amount.
    At the moment - if it's defined - it will drop the given percentage of every item stack in the inventory. Should I change that to drop random, complete item stacks (whose ratio would match the percentage)?
    It would seem more accurate to me, what do you think?
     
  29. Offline

    Pyraah

    Thanks. :)
     
  30. Offline

    morizuki

    Ok.. we've tried it again.. and No error came up.. but.. the items are still lost..
     

Share This Page