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

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

  1. You could easily do that with your multiworld supporting permissions plugin. In your "hardcore pvp world", just don't give people deathcontrol.use permission and it won't do anything!
    It comes to an end if you only want some causes in a world but other in another one.
    But per-cause permissions are already planned (something like deathcontrol.use.PVP), not for 1.2 though.
     
  2. Offline

    Dagumboss

    I think you need to add Herobrine to the list of death causes. I don't know if it's because of HeroicDeath but when you use arrows and the cause comes up Herobrine, they lost all they're items.
     
  3. @Dagumboss U mad? That's what Herobrine is. You can't say he was the reason for your death. HeroicDeath uses the message "xxx was killed by Herobrine." as sort of a "joke" when it is unable to figure out what killed someone. Projectile damage (such as arrows) was changed in RB1060, so HeroicDeath seems to fail to handle that situation correctly - consider updating.

    I have already fixed projectiles, will be released in the update in a couple of hours.
     
  4. Offline

    ochenchi

    So, unknown... If you had that enabled, if you used /kill Steve he would keep his items?
     
  5. Offline

    Dagumboss

    @Bone008 Uh, okay. I was just reporting a bug I found in the case that you might not know about it. No need to be a little prick about it.
     
  6. @Dagumboss I'm sorry if that offended you. I was just trying to explain the circumstances of HeroicDeath and its Herobrine-message. I apologize if that sounded harsh, that wasn't intended.
    Actually, I was only reported of skeleton deaths being broken. So thank you for stating that thing with a pvp bow kill.

    Hey guys, the update is out! Lots of major changes! Check the changelog and download link in the op post.
    The config file changed and a new one (lists.txt) was added. Details inside!

    Note when updating: A backup of your old config will be saved and the new ones generated, make sure to take over your settings!

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

    Moromillas

    How do I turn off debug?
     
  8. I didnt intent the logging as debugging, rather as knowing what is going on in the logs. But yeah, the main message turned out pretty big, so i might want to add a possibility to disable it.

    Note that im on vacation so i wont be able to code anything until 3rd september.
     
  9. Offline

    Moromillas

    Oh, bummer. :( Bummer for me that is, vacation sounds nice.
     
  10. Offline

    Worlther

    My config:
    Code:
    DeathCauses:
        CONTACT:
            keep-inventory: true
            method: auto
        FALL:
            keep-inventory: true
            method: auto
        FIRE:
            keep-inventory: true
            method: auto
        FIRE_TICK:
            keep-inventory: true
            method: auto
        LAVA:
            keep-inventory: true
            method: auto
        DROWNING:
            keep-inventory: true
            method: auto
        SUFFOCATION:
            keep-inventory: true
            method: auto
        EXPLOSION:
            keep-inventory: true
            method: auto
        VOID:
            keep-inventory: true
            method: auto
        PVP:
            keep-inventory: true
            method: auto
        CREEPER:
            keep-inventory: true
            method: auto
        WOLF:
            keep-inventory: true
            method: auto
        MOB:
            keep-inventory: true
            method: auto
        SUICIDE:
            keep-inventory: true
            method: auto
        UNKNOWN:
            keep-inventory: true
            method: auto
    That's happend when i'm die:


    Code:
    19:37:54 [INFO] [DeathControl] Handling death:
    19:37:54 [INFO] [DeathControl] | Player: aboisavip
    19:37:54 [INFO] [DeathControl] | Death cause: FALL
    19:37:54 [INFO] [DeathControl] | Kept items: all
    19:37:54 [INFO] [DeathControl] | Method: auto
    19:37:54 [INFO] [DeathControl] Timer for aboisavip expired! Items dropped.
    WTF?
     
  11. @Worlther that should not happen. Make sure your config was actuually loaded as you posted it when the log appeare. also check the console prior to that for errors/upgrades. If you updated the plugin, your old config was backupped ans thenew default one written & loaded. i think Fall is registered by default as an example.
     
  12. Offline

    Worlther

    When server start:

    Code:
    2011-08-24 21:17:12 [INFO] [DeathControl] loaded 3 lists!
    2011-08-24 21:17:12 [INFO] [DeathControl] loaded 15 valid death causes!
    2011-08-24 21:17:12 [INFO] [DeathControl] is now using bukkit permissions!
    2011-08-24 21:17:12 [INFO] [DeathControl] version 1.2 was enabled!
    I'm completly rewrite config after update.
     
  13. 15 death causes get loaded, but you only listed 6 in your config. Did you try restarting the server and tried some more times?

    If it happens again and again (and the messages on startup still dont match the file, then please post your complete config.yml with everything.
     
  14. Offline

    DJTza

    We have a problem if people get DCed when they die they lose all their items. Is it possible to make it so that doesn't happen? Would be really useful
     
  15. Offline

    Tauryuu

    Can you fix a problem with MobArena, so when a player dies in the arena, they won't get the message?
     
  16. WHat do you mean with "when people get DCed"?

    Would be a special hook for a particular plugin. Ill take a look when I return, but if the plugin doesnt offer an API that could get ugly.
     
  17. Offline

    Dayshade

    Hello, I'm creating a Bukkit server, and so far things have been going smoothly. However, when I installed DeathControl, I keep getting an error that is similar to this:

    Code:
    14:44:06 [SEVERE] Could not load 'plugins/DeathControl.jar' in folder 'plugins':
    while scanning a simple key
     in "<reader>", line 198, column 5:
            SUICIDE
            ^
    could not found expected ':'
     in "<reader>", line 199, column 23:
                keep-inventory: true
                              ^
    
    	at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:400)
    	at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:231)
    	at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:182)
    	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:564)
    	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    	at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
    	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    	at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    	at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    	at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    	at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    	at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
    	at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
    	at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
    	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    ----

    Code:
    while scanning a simple key
     in "<reader>", line 198, column 5:
            SUICIDE
            ^
    could not found expected ':'
     in "<reader>", line 199, column 23:
                keep-inventory: true
                              ^
    Those rows keep moving around. I've tried restarting the server a few times, and also retyping the code for the broken part. However, once I retype the broken part, the error simply moves to another part of the code. This has happened 4 times. Despite all those errors, the server manages to go up and run smoothly, although without loading DeathControl.

    Here's the part of the code with the supposed error:

    Code:
    DeathCauses:
        VOID:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        LAVA:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        CONTACT:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        FALL:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        FIRE:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        FIRE_TICK:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        WATER:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        SUFFOCATION:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        ENTITY_EXPLOSION:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        CREEPER:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        ENTITY:
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        SUICIDE
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
        PLAYER
            keep-inventory: true
            cost: 3000
            method: command
            timeout: 20
        WOLF
            keep-inventory: true
            cost: 3000
            method: command
            timeout: 20
        UNKNOWN
            keep-inventory: true
            cost: 1000
            method: command
            timeout: 20
    Can anyone help diagnose this problem? Thanks in advance.

    Dayshade
     
  18. Offline

    DJTza

    Sorry, DCed means disconnected. If someone dies, then leaves or gets kicked from server before respawning, their items get dropped. Is there any way of fixing this so they keep them regardless?
     
  19. Offline

    Himeki

    I have PermissionsEx (basically a clone of the Permissions plugin. Upon server start or restart, it defaults to the OP system, not permissions.
    The issue is that it's loading before permissions (I think), several other plugins used to have this issue and fixed it quickly so hopefully it's not too hard.
    Code:
    08:19:22 [INFO] [DeathControl] loaded 3 lists!
    08:19:22 [INFO] [DeathControl] loaded 14 valid death causes!
    08:19:22 [INFO] [DeathControl] is now using the OP-system!
    08:19:22 [INFO] [DeathControl] version 1.2 was enabled!
    However if I force a reload on ONLY DeathControl it will work correctly.
    Code:
    09:21:17 [INFO] [DeathControl] Plugin was disabled!
    09:21:17 [INFO] Disabled: [DeathControl]
    09:21:17 [INFO] [DeathControl] loaded 3 lists!
    09:21:17 [INFO] [DeathControl] loaded 14 valid death causes!
    09:21:17 [INFO] [DeathControl] is now using the Permissions plugin!
    09:21:17 [INFO] [DeathControl] version 1.2 was enabled!
    09:21:17 [INFO] Enabled: [DeathControl]
    And in the config file
    Code:
    # Set to true to use native bukkit permissions (recommended)
    
    # Set to false if you want to use another permissions plugin or the op system
    use-bukkit-permissions: false
    I also tried setting true (figured why not try it has a chance to work), didn't help.
     
  20. Offline

    Ayaron

    First, just wanted to say, I like the plugin. Very useful for some of my players who have a nasty habit of falling off high places all the time.

    Small piece of constructive criticism though...

    "Player respawned and got back his items."

    His? Not all players are male remember.

    Could the default for this be changed to be gender non-specific please?

    Example: Player respawned and got back their items.

    :O)
     
  21. Alright, I'm back from vacation (1.8 isnt out yet, *whew*), time to answer ...

    @Dayshade
    The last 4 causes (beginning from SUICIDE) lack of a colon :)) after the name. Put it there like you did above. Probably just a little copy&paste mistake.

    @DJTza
    That was a quick fix (1.12) to prevent the items from vanishing completely when the player disconnects. Keeping them over reconnects is a bit more complicated, but I was planning to do that. Forgot to put in on the To-Do list though, so I lost sight of it. Will work on it.

    @Himeki
    Should be rather easy to fix. Actually, you can do it by yourself pretty quickly:
    Open DeathControl.jar with a programm like WinRAR, you should find a file called "plugin.yml". Add the following line there.
    Code:
    softdepend: [Permissions, PermissionsEx]
    You can add it at the very bottom or below the line with "description:". But it doesn't matter.
    If you have problems getting it to work, wait for a quick update of mine, it'll be there once I'm settled here again ;)

    @Ayaron
    Oh well, I didn't expect anyone to notice that :p
    I thought about it while writing the messages, but I didn't find a pretty and easy solution. "their" would be grammatical wrong (plural, and player is singular). "he/she" looks ugly and I hate using that. I guess "it" would fit, even though it sounds weird to me.
     
  22. Offline

    Himeki

    @Bone008
    Thank you, hadn't even thought to do that. The worst part being I have a few other plugin.yml files open due to adding aliases and canceling commands to make them work together. *facepalm*

    Thanks again.

    edit:
    Well I tried it, and it still comes up with the same issue. Made sure to copy and paste it, as well as check for spacing issues.

    PermissionsEx is loading up first, but DC still defaults to OP system unless I reload the plugin itself without reloading the rest of the server.
     
  23. Offline

    Dayshade

    I figured about my problem a few days ago, but thanks for answering, Bone. Death Control is working perfectly.
     
  24. Offline

    Maine

    Running DeathControl v1.2, craftbukkit 1060.

    When a player dies, they get the message that they kept all of their items, but if they wait too long (this time varies from half a second to 10 seconds in our tests) they will get the Timeout message stating their items have dropped. This is peculiar because I have not set it to use 'command' mode, so this should not be happening. If players respawn before the time is up they automatically keep all of their items.

    From the logs:

    Code:
    2011-09-04 22:15:33 [INFO] [DeathControl] Handling death:
    2011-09-04 22:15:33 [INFO] [DeathControl] | Player: ........
    2011-09-04 22:15:33 [INFO] [DeathControl] | Death cause: ENTITY
    2011-09-04 22:15:33 [INFO] [DeathControl] | Kept items: all
    2011-09-04 22:15:33 [INFO] [DeathControl] | Method: auto
    2011-09-04 22:15:35 [INFO] [DeathControl] Timer for fafner07 expired! Items dropped.
    
    My config:


    Show Spoiler

    Code:
    use-bukkit-permissions: true
    
    DeathCauses:
        CONTACT:
            keep-inventory: true
        FALL:
            keep-inventory: true
        FIRE:
            keep-inventory: true
        FIRE_TICK:
            keep-inventory: true
        LAVA:
            keep-inventory: true
        DROWNING:
            keep-inventory: true
        WATER:
            keep-inventory: true
        SUFFOCATION:
            keep-inventory: true
        EXPLOSION:
            keep-inventory: true
        ENTITY_EXPLOSION:
            keep-inventory: true
        VOID:
            keep-inventory: true
        PVP:
            keep-inventory: true
        PLAYER:
            keep-inventory: true
        CREEPER:
            keep-inventory: true
        WOLF:
            keep-inventory: true
        MOB:
            keep-inventory: true
        ENTITY:
            keep-inventory: true
        SUICIDE:
            keep-inventory: true
        UNKNOWN:
            keep-inventory: true
    
     
  25. @Maine I tried to reproduce that, but I failed. The only possible ways for the expired message to appear are the following:
    - the plugin was disabled
    - the player quit
    - the death for that player is handled again
    - the timer actually expired after the set time
    Now judging by the log, there shouldn't be a timer, nor should the player have quit, nor was the plugin disabled.
    That points to the 3rd option, but I really can't explain that ...

    I noticed that you double-registered aliases. "MOB" and "ENTITY" refer to the same death cause, and you don't need to register them twice.
    It should do no harm, but try removing the duplicate stuff (either MOB or ENTITY). That's really the only reason I can think of, unless you have the plugin installed twice or sth like that.
     
  26. Offline

    Maine

    I made the change as requested, and removed 'ENTITY_EXPLOSION', 'MOB', and 'PLAYER' duplicates. Reloaded the config - even restarted the server, it still occurs.

    This time I noticed it happened when two players died simultaneously. It's not 100% reproducible, and when it occurs the timer varies greatly.

    Code:
    2011-09-05 10:50:05 [INFO] [DeathControl] Handling death:
    2011-09-05 10:50:05 [INFO] [DeathControl] | Player: jdmill2
    2011-09-05 10:50:05 [INFO] [DeathControl] | Death cause: CREEPER
    2011-09-05 10:50:05 [INFO] [DeathControl] | Kept items: all
    2011-09-05 10:50:05 [INFO] [DeathControl] | Method: auto
    2011-09-05 10:50:05 [INFO] [DeathControl] Handling death:
    2011-09-05 10:50:05 [INFO] [DeathControl] | Player: MaineCoon79
    2011-09-05 10:50:05 [INFO] [DeathControl] | Death cause: ENTITY
    2011-09-05 10:50:05 [INFO] [DeathControl] | Kept items: all
    2011-09-05 10:50:05 [INFO] [DeathControl] | Method: auto
    2011-09-05 10:50:07 [INFO] [DeathControl] Timer for jdmill2 expired! Items dropped.
    

    If you want I could try running a custom version that dumps a stack trace... I am attempting to get jdb working so I don't need a modified plugin, but am having issues with it (on Linux).

    Update:

    It looks like it's a conflict with the 'Heroes' plugin (or more properly, a bug in Heroes), which will attempt to modify health, and cause a second death:

    Here's the backtrace when it triggers the expire:

    Code:
      [1] bone008.bukkit.deathcontrol.DeathManager.expire (DeathManager.java:225)
      [2] bone008.bukkit.deathcontrol.DeathManager.<init> (DeathManager.java:43)
      [3] bone008.bukkit.deathcontrol.DeathControlEntityListener.onEntityDeath (DeathControlEntityListener.java:33)
      [4] org.bukkit.plugin.java.JavaPluginLoader$60.execute (JavaPluginLoader.java:663)
      [5] org.bukkit.plugin.RegisteredListener.callEvent (RegisteredListener.java:58)
      [6] org.bukkit.plugin.SimplePluginManager.callEvent (SimplePluginManager.java:338)
      [7] net.minecraft.server.EntityPlayer.die (EntityPlayer.java:142)
      [8] org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth (CraftLivingEntity.java:42)
      [9] com.herocraftonline.dev.heroes.persistence.Hero.syncHealth (Hero.java:62)
      [10] com.herocraftonline.dev.heroes.damage.HeroesDamageListener$1.run (HeroesDamageListener.java:282)
      [11] org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat (CraftScheduler.java:137)
      [12] net.minecraft.server.MinecraftServer.h (MinecraftServer.java:428)
      [13] net.minecraft.server.MinecraftServer.run (MinecraftServer.java:363)
      [14] net.minecraft.server.ThreadServerApplication.run (SourceFile:422)
    
     
  27. Offline

    Ayaron

    Actually thier would not be grammatically wrong. But this is one of those things that people often think is becuase teachers often get it wrong themselves and teach that it's plural only, when it isn't.

    They and their can also be used in the singular when numbers or gender is not known. As in...
    • number — "Anyone who thinks they have been affected should contact their doctor";
    • gender — "One student failed their exam."
    This is grammatically correct.

    The Cambridge Guide to English Usage (2004) expresses several preferences. "Generic/universal their provides a gender-free pronoun, avoiding the exclusive his and the clumsy his/her. They, them, their are now freely used in agreement with singular indefinite pronouns and determiners, those with universal implications such as any(one), every(one), no(one), as well as each and some(one), whose reference is often more individual....For those listening or reading, it has become unremarkable—an element of common usage."

    Source of info...
    http://en.wikipedia.org/wiki/Singular_they



    Also...

    The words "they"/"their"/"them"/"themselves" referring to a singular antecedent with indefinite or generic meaning in Jane Austen's writings (mainly in her six novels), as well as further examples of singular "their" etc. from the Oxford English Dictionary (OED) and elsewhere. While your high-school English teacher may have told you not to use this construction, it actually dates back to at least the 14th century, and was used by the following authors (among others) in addition to Jane Austen: Geoffrey Chaucer, Edmund Spenser, William Shakespeare, the King James Bible, The Spectator, Jonathan Swift, Daniel Defoe, Frances Sheridan, Oliver Goldsmith, Henry Fielding, Maria Edgeworth, Percy Shelley, Lord Byron, William Makepeace Thackeray, Sir Walter Scott, George Eliot [Mary Anne Evans], Charles Dickens, Mrs. Gaskell, Anthony Trollope, John Ruskin, Robert Louis Stevenson, Walt Whitman, George Bernard Shaw, Lewis Carroll, Oscar Wilde, Rudyard Kipling, H. G. Wells, F. Scott Fitzgerald, Edith Wharton, W. H. Auden, Lord Dunsany, George Orwell, and C. S. Lewis.

    Source of info...
    http://www.crossmyt.com/hc/linghebr/austheir.html#X1a


    So you can safely use 'their items' and be have the ammunition to be safe from any internet pedantics who try to flame you over it.

    :O)
     
  28. @Maine
    That makes it pretty clear. Thanks for testing, now it's apparently up to the Heroes-guys.

    @Ayaron
    Wow, no one indeed ever taught me that. Nice to know, will change.
     
  29. Offline

    Maine

    The inventory layout does not appear to be maintained on death - only the order.

    There is another plugin, InventorySave, which did seem to keep the inventory layout (it doesn't appear to be updated, and doesn't work if you die to a Wolf). Is there any chance this functionality can be implemented in DeathControl?

    Update: additionally, it would be nice if inventory can be kept if the player logs out while dead, as they will still have to respawn once they log in
     
  30. @Maine
    In the very first version of the plugin (1.0) the old inventory was copied exactly and thus the "format" was kept as well. The feature was lost with the introduction of the command-method for one reason: if the player collected items during the period of respawning and issuing the command to get back the items, they would be lost or would collide with the exact old inventory.

    For the thing when the player logs out: please take a look at the second aspect of the To-Do list, it's already planned :)
     

Share This Page