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

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

  1. Great idea, I never thought of that. But how exactly would you configure that? Percentage? Certain items?
    Only nothing or everything seems kind of harsh.
  2. Offline


    You could combine it with the percentage the player keeps.
    Just add a config, to drop the other items or remove them completely.
  3. Offline


    Yeah, my personal use is for certain groups of players to lose all items for events. But maybe like this:

    Loss-percentage: []
    Items-drop: [true/false]
  4. Sounds reasonable, added to ToDo list :)
  5. Offline


    I tried this out having all but my whitelisted items drop, via:

        UNKNOWN (and all other tags):
            keep-inventory: true
            method: auto
            loss-percentage: 100
            - armor
            - diamondtools
            - valuables
    But it complained that "loss has an incorrect value of 100", or something similar in the console. Changing this to 99.9 fixed the issue, but obviously that's not 100%. That's probably just a small grammatical error using "< 100" instead of "<= 100" within your script.

    Now I am using:

            keep-inventory: true
            method: auto
            loss-percentage: 50
            - armor
            - diamondtools
            - irontools
            - valuables
    It seems as though loss percentage works within the whitelist. So if I have three diamond picks and a bunch of stone, and i keep 33% of my items, I'll only keep one diamond pick.

    This seems wrong, logically. If an item is on the whitelist, it should never be dropped. The loss percentage should account for the items not found in the whitelist.

    What's the deal?

    EDIT: Thinking about it, it sort of makes sense. I think there should be a loss-percentage AND a whitelist-loss-percentage, for more flexibility and less confusion.
  6. @RadGH
    The point of a whitelist is usually to limit a huge group of things to just a couple of members of that group.
    Same here with all items limited to only the whitelisted ones. So your first example without the loss-percentage would probably be perfect.
    A loss-percentage of 100% is pointless because it would simply drop every item regardless of the remaining settings. You can just set "keep-inventory" to false if you want to achieve that.

    Loss-percentage works after the whitelist was applied to the result set (thus creating the "within" behavior). That's because the whitelist only says "only keep these items and not the rest", so randomly picking another item to drop (loss-percentage) which is not on the whitelist would sort it out twice (makes no real sense IMHO).

    I think you expected the whitelist to be a "exclude these from ever droppen; always keep!" setting - then your post makes completely sense.
    Such a feature is not yet implemented, but it was suggested at some point and put on the whitelist.
    I didn't implement it yet, but maybe it'll make it into the next update :)
  7. Offline


    maybe add an auto repair armor and tools upon death?
  8. Offline


    Nice plugin I'm setting this up to work with with deathtp in tandem which is a excellent all round death solution.

    One thing a cosmetic change for next update for you to change 'You keep All your items' cause if you use a command yo get back all all your items you may or may not get to keep them especially if you don't have the money.

    On Auto the message is fine but if you use command it should read 'You may keep all items'.
  9. @pandapipino I don't know, improving items when dying? Maybe I'll add that, but it seems pretty unlikely right now since I'm not spending too much time on the plugin ATM.

    @Revenger Thank you! The reason why I kept the message like that for the command-method is because the are actually still kept (meaning, not dropped). So a player might be confused if their items aren't there when they walk up to their death location and the plugin didn't really state the reason for that.

    But with the next version, I'll hopefully do the custom message support, so you'll be able to change that if you mind that :)
  10. Offline

    Don Redhorse

    shameless plug... new deathtp version
  11. Offline


    Error :(

    2011-10-06 09:24:13 [SEVERE] Could not pass event ENTITY_DEATH to DeathControl
    java.lang.IncompatibleClassChangeError: Expected static method com.nijikokun.register.payment.Methods.getMethod()Lcom/nijikokun/register/payment/Method;
    at bone008.bukkit.deathcontrol.DeathControl.getRegisterMethod(DeathControl.java:229)
    at bone008.bukkit.deathcontrol.DeathManager.pay(DeathManager.java:298)
    at bone008.bukkit.deathcontrol.DeathManager.handle(DeathManager.java:117)
    at bone008.bukkit.deathcontrol.DeathControlEntityListener.onEntityDeath(DeathControlEntityListener.java:37)
    at org.bukkit.plugin.java.JavaPluginLoader$64.execute(JavaPluginLoader.java:691)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:303)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:160)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:469)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:584)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:202)
    at net.minecraft.server.Entity.aa(Entity.java:271)
    at net.minecraft.server.EntityLiving.aa(EntityLiving.java:124)
    at net.minecraft.server.Entity.s_(Entity.java:192)
    at net.minecraft.server.EntityLiving.s_(EntityLiving.java:268)
    at net.minecraft.server.EntityHuman.s_(EntityHuman.java:153)
    at net.minecraft.server.EntityPlayer.b(EntityPlayer.java:215)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:305)
    at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
  12. @PyPKjE You are running an outdated version of Register or none at all. That is probably because you are running a plugin that has Register included, but with the same namespace and an old version. That corrupts plugins using newer versions - including this one.
    That's not an issue of mine. Try to look for a plugin on your server that uses economy systems and is built on Register (should be mentioned in its thread/repo) and either update it if the author already fixed it or nag the author to do so.
  13. Offline


    This is your proposal register plugin is not working!

    2011-10-07 09:17:11 [SEVERE] com.nijikokun.register.payment.Methods.setPreferred(Ljava/lang/String;)Z initializing Register v1.5 (Is it up to date?)
    java.lang.NoSuchMethodError: com.nijikokun.register.payment.Methods.setPreferred(Ljava/lang/String;)Z
    at com.nijikokun.register.Register.hasPreferred(Register.java:41)
    at com.nijikokun.register.Register.onLoad(Register.java:55)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:142)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:104)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)

    2011-10-07 09:17:17 [SEVERE] Could not pass event PLUGIN_ENABLE to Register
    java.lang.IncompatibleClassChangeError: Expected static method com.nijikokun.register.payment.Methods.hasMethod()Z
    at com.nijikokun.register.listeners.server.onPluginEnable(server.java:37)
    at org.bukkit.plugin.java.JavaPluginLoader$47.execute(JavaPluginLoader.java:569)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:948)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:174)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:157)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
  14. I can only repeat what I have said ...
    Another plugin on your server has its own, older version of Register, that makes the newer version not working!

    I can probably tell you which plugin causes that when I know which plugins you have running on your server. But it's not my fault if other developers ignore the guidelines.
  15. Is it possible, to make people pay AFTER the /death back ?

    So if I set a cost of 100, the player has to pay 100 ONLY if he does /death back.

    So people can chose to get their item back or not.
    Because now, people juste pay to die, even if they don't want to keep their items.
  16. It was originally exactly like you suggested, but it seems I accidentally changed that while recoding death handling ...
    Thanks for the remark, will change back.
  17. Offline


    This error happens whenever someone dies on my server.

    Show Spoiler
    2011-10-18 00:16:01 [SEVERE] Could not pass event ENTITY_DEATH to DeathControl
    at bone008.bukkit.deathcontrol.config.CauseSettings.getBlacklist(CauseSettings.java:107)
    at bone008.bukkit.deathcontrol.config.CauseSettings.isValidItem(CauseSettings.java:125)
    at bone008.bukkit.deathcontrol.DeathManager.calculateItems(DeathManager.java:163)
    at bone008.bukkit.deathcontrol.DeathManager.handle(DeathManager.java:101)
    at bone008.bukkit.deathcontrol.DeathControlEntityListener.onEntityDeath(DeathControlEntityListener.java:37)
    at org.bukkit.plugin.java.JavaPluginLoader$64.execute(JavaPluginLoader.java:707)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:303)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:160)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:469)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:584)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:202)
    at net.minecraft.server.Explosion.a(Explosion.java:142)
    at net.minecraft.server.World.createExplosion(World.java:1461)
    at net.minecraft.server.WorldServer.createExplosion(WorldServer.java:201)
    at net.minecraft.server.EntityCreeper.a(EntityCreeper.java:118)
    at net.minecraft.server.EntityCreature.c_(EntityCreature.java:69)
    at net.minecraft.server.EntityLiving.s(EntityLiving.java:788)
    at net.minecraft.server.EntityMonster.s(EntityMonster.java:27)
    at net.minecraft.server.EntityLiving.s_(EntityLiving.java:280)
    at net.minecraft.server.EntityMonster.s_(EntityMonster.java:31)
    at net.minecraft.server.EntityCreeper.s_(EntityCreeper.java:68)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1193)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1175)
    at net.minecraft.server.World.tickEntities(World.java:1090)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:467)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
  18. Thank you for your report! This will be fixed in the next version (which I am still working on).
    On a side note, this happens when you have defined a child-cause (for example MOB|CREEPER) without defining its parent cause (MOB in this example). That is supposed to work correctly, but it apparently doesn't.
    Until I release a fix for that, you could try defining the parent-cause for your sole child-causes (and give them default-values if you like).
    Sorry for the inconvenience.
    diannetea likes this.
  19. Offline


    Thanks for this plugin -- had a hard time finding a good death plugin. Keep up the great work!
  20. Offline


    I really appreciate your plugin; however, this comes up fairly often:

    22:42:44 [INFO] [DeathControl] Dropping saved items for xxxx
    22:42:44 [INFO] [DeathControl] because they left the game!

    A large majority of the time, it's due to lag/connectivity issues. Is there any way to set a timeout?

    For example, if a user is disconnected, would it be possible to allow 900 seconds for a user to return before dropping their items?

    Thanks again!
  21. @wooper Thank you for your feedback, that's always great to hear :)
    As for the thing with leaving players: I've already planned changing that for quite some time, but with low priority. It does require some big changes. I think I will look into it soon, as it was requested several times now.
  22. Offline


    Hi. Hope you can help as I still cannot get this plugin to work correctly.
    I am using BukkitPermissions, the latest build of DeathControl and the latest build of Register. DeathControl "works" but it works for everyone on the server, not just the group I have assigned it to (Donators). I have Bukkitpermissions set to true in the config and I have scoured my permissions file but only the one group (and no individual players) have "deathcontrol.use true".

    Any suggestions? If I cannot get this fixed I will have to remove it as everyone is just mucking about, killing themselves safe in the knowledge they wont lose anything.
  23. While I was writing something here, I noticed one thing that came to my mind:
    The default value of deathcontrol.use is true, so basically everyone will have it by default. The reason is that if someone wants no permissions for that and just rely on the op-system, normal players should be able to use the plugin like normal.

    Now I do realize the issue behind this concept. There is actually even an option to disable bukkitperms checking in the config, but it was initially designed for people with the old Permissions plugin.
    For a fix you could do one of these things:
    1. In your default group (or in whatever group everyone has by default), explicitly define "deathcontrol.use: false"
    2. Open up DeathControl.jar with an archiver and edit the file "plugin.yml". Permissions are listed there, under "deathcontrol.use", just set "default" to false or "op".

    I will change that default in the next release, as it currently doesn't do what you would assume it to do intuitively.
    Sorry for that, I hope that fixed your issue.
  24. Offline


    Oh right- that makes sense. I grant its a bit backwards but at least I can work with it! Thanks for the info man - trying out your suggestion now on the server =)
  25. Offline


    Can you implement or work with the author of Spout backpack?

    We have installed spout backpack and notice we either have keep all items or drop all items on death.

    With this plugin they can keep both there inventory and backpack for a price.
  26. Offline


    Sweet plugin. Just one question: Is there MultiWorld support? Like you can choose which world you want to lose your items. Because on my server I host custom maps, and its less fun if you keep your items.
  27. What exactly is there to do on my side? In terms of: What is possibly happening at the moment, and what would you prefer to happen?

    Thanks, MultiWorld support is currently limited to your permissions plugin. So in worlds where you don't want anyone to keep items, just set the permission "deathcontrol.use" to false.
  28. Offline


    Spout backpack is currently broken for us it keeps all items in a file in there playerfile.

    Has a option:

    What I would like from your side or there side whatever needed is when a player dies it gets the backpack back same as inventory using economy credit for the reason if not it drops it the same.

    So a temporary hold to get items back if not they drop same as inventory.

    I don't know who has to do what to get this to work once backpack is updated but be a really cool addition.
  29. Offline


    Does this work with the new Bukkit 1337? It says you updated this mod today.
  30. Offline


    Can you add the ability to drop items only in the hotbar? Great plugin btw :)

Share This Page