Inactive [FUN/INFO] DeathNotifier - BUKKITDEV

Discussion in 'Inactive/Unsupported Plugins' started by Geoff Winans, Jul 9, 2011.

  1. Offline

    Geoff Winans

    DeathNotifier - Broadcast Deaths!

    DeathNotifier is, for now, a very simple plugin that has no external requirements. It does not use, nor care about, Permissions of any sort.

    This is the first official release of this plugin and is the official Death Notification plugin for the GoMinecraft server.

    Features:
    • It broadcasts deaths with a (random) message!
    • You can customize the messages and even add more for each mob type!

    Now on BukkitDev!
    >> Click Here <<
     
    _LB likes this.
  2. Offline

    codename_B

    so... what makes this any different from HeroDeath? Also - what events does it support?

    Also - changelog must be at the end of the post...
     
  3. Offline

    Geoff Winans

    Is there a reason you have to ask that question?

    I do not care that there may be 50 other plugins that do this. (In fact, there are 4 that do this that I know of - probably more).


    Why? Because just about every other plugin that exists is a duplication of effort. This is me learning java. I'm not here to please you.

    If HeroicDeath does it better, great. Let users use HeroicDeath.

    Also, the source is available, so take a look if you want to know which events it supports. I'll add more eventually.
     
    kattemjau, _LB and Orcem12 like this.
  4. Offline

    spunkiie

    @Geolf Winans

    Can I enable **only** PVP death messages ? HeroicDeath and others plugins of this kind doesn't support this feature.

    BTW: Getting this error with #953

    22:01:54 [SEVERE] Error occurred while enabling DeathNotifier v0.4 (Is it up to date?): null
    java.lang.NullPointerException
    at com.gomysql.gwinans.DeathNotifier.DeathNotifier.onEnable(DeathNotifier.java:27)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

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

    Geoff Winans

    @spunkiie,

    I'll take that under consideration - only allowing messages for certain situations.

    Also, you may want to try pulling the plugin down again from gominecraft.com/plugins/DeatherNotifier.jar - you may have fetched it right before I did a quick fix for 0.4

    If it is still happening, what killed you when it happened?
     
  6. Offline

    spunkiie

    Would be great if one left the message empty '' no messages are displayed.
    ie:
    changing: Void: '&E%player% &2fell into the &Cvoid!'
    to: Void: ''
    Would completely disable this message :)

    BTW: Just download again and still got the same error.
    Here's the .jar md5sum: ec8a39bb40ccaf3fe380dc0641b508c6

    @Geolf Winans

    If you make possible to disable messages I will for sure remove HeroicDeath and use your plugin instead on my 400+ server.

    Please make it happens ;)

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

    Geoff Winans

    @spunkiie, what were you doing when the NPE fired off? Die to TNT? Lava? Ghast?

    @spunkiie

    Fixed it. I'll have to lay off doing dev work until I'm not so tired :)

    I may just make a minimalized PvP-Only DeathNotifier. I know there are a few servers that are pure pvp with mobs/animals disabled.

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

    spunkiie

    0.5 working OK now.

    Thank you.

    A minimalized PvP-Only DeathNotifier would as well solve my problem.
     
  9. Offline

    Orcem12

    Good work, I support this plugin. I love how you clearly stated that you made this plugin simply for the enjoyment of learning Java. Keep up the great work! :)
     
  10. Offline

    spunkiie

    WTF ?

    I've just left the message blank and it's working (i.e: not showing) :D
     
  11. Offline

    Orcem12

    0.5 working OK now.

    Thank you.

    A minimalized PvP-Only DeathNotifier would as well solve my problem.

    It's there. :p
     
  12. Offline

    spunkiie

    update: I'm uploading this plugin on my server right now!

    Working like a charm with 340 players online.

    Thank you very much, can't believe I'm finally getting rid of HeroicDeath

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

    Geoff Winans

    Holy smokes, spunkiie! 340 players?!

    That's gotta be a record of some sort.

    As it turns out, if you simply blank out the non-pvp entries, it won't show them!

    So, uh.. unintended affect!

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

    spunkiie

    Yeap, our record is 480 online ;)

    Oh, and please DON'T fix the unintended effect!
    :D

    TY again
     
  15. Offline

    codename_B

    @Geoff Winans - alright good on you - I see you're providing good support for this plugin, fixing bugs etc. I was there not too long ago as well! I'll see you again once you've got your purple badge ;)
     
  16. Offline

    Geoff Winans

  17. Offline

    madibao

    Your plugin is great, i´m using it. :cool:
    When i die from a mob it broadcast to all, but i have a question:
    Is there a plugin that broadcast when a player kills a mob? [creeper] }Like: Player_1 send a Zombie to the ground.{
    [Sry for the errors. :p English is not my primary, secondary or any language... =P Just Portuguese-Brazil]
     
  18. Offline

    Geoff Winans

    I can't say I've seen one.
     
  19. Offline

    spunkiie

    Just updated to 0.7. Working OK!
     
  20. Offline

    Geoff Winans

    No update required, this works with B1000.
     
  21. Offline

    Matterz

    Code:
    event.getEntity().setLastDamageCause(null);
    Why do this? There is no reason to set the Last Damage Cause to null. This just causes NPE for any other plugin that might want to see the cause of death (Jobs, Bounties, Supernatural Players, etc etc).

    Please fix this ASAP if you don't want more angry plugin developers to show up with pitchforks. These types of errors are such a pain to debug...
     
  22. Offline

    phrstbrn

    I submitted a patch on github which fixes this bug which breaks every other plugin that needs to look at ENTITY_DEATH events.
     
  23. Offline

    Geoff Winans

    I've pulled it. Will update the post in a few.

    Thank you, phrstbrn.

    As to you, Matterz, it was one of my <failed> attempts at making it so that the player who just died couldn't just repeatedly /kill himself and spam the message over and over again. Every other notifier plugin has that problem - if you die by a certain method and then /kill yourself, the last death method is repeated endlessly until the LastDamageCause changes.

    Also, chill pill. Take one or two ;p
     
  24. Offline

    phrstbrn

    Store the last damage cause in a HashMap on death, and do a compare on the one in the HashMap and the actual last damage cause.

    PHP:
    EntityDamageEvent e damagecauses.get((Player)event.getEntity());
    if(
    != null && e.equals(event.getEntity().getLastDamageCause()) {
        
    // it's the same
    } else {
        
    damagecauses.put((Player)event.getEntity(), event.getEntity().getLastDamageCause());
        
    // do the good stuff
    }
     
  25. Offline

    Limstal

    HELP I BROKE IT Awesome! Realised I just managed to botch the config file with some bad syntax. This is the first (of many, hopefully ;)) plugins I've ever used, and it works like a charm! Nice job.
    Edit: Are we limited to two messages per event? Exceptions start getting thrown up if I try adding another field, and it's not an illegal character.
     
  26. Offline

    Ture

    DeathNotifier just threw an exception in my face. Running v0.8 on cb1000.

    Code:
    10:45:23 [SEVERE] Could not pass event ENTITY_DEATH to DeathNotifier
    java.lang.IllegalArgumentException: n must be positive
            at java.util.Random.nextInt(Unknown Source)
            at com.gomysql.gwinans.DeathNotifier.DeathNotifierConfig.readList(DeathNotifierConfig.java:61)
            at com.gomysql.gwinans.DeathNotifier.DeathNotifierEntityListener.getMessage(DeathNotifierEntityListener.java:173)
            at com.gomysql.gwinans.DeathNotifier.DeathNotifierEntityListener.onEntityDeath(DeathNotifierEntityListener.java:92)
            at org.bukkit.plugin.java.JavaPluginLoader$59.execute(JavaPluginLoader.java:656)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:141)
            at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:391)
            at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:436)
            at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:179)
            at net.minecraft.server.EntityMonster.a(EntityMonster.java:90)
            at net.minecraft.server.EntitySpider.a(EntitySpider.java:78)
            at net.minecraft.server.EntityCreature.c_(EntityCreature.java:64)
            at net.minecraft.server.EntityLiving.v(EntityLiving.java:685)
            at net.minecraft.server.EntityMonster.v(EntityMonster.java:26)
            at net.minecraft.server.EntityLiving.m_(EntityLiving.java:218)
            at net.minecraft.server.EntityMonster.m_(EntityMonster.java:30)
            at net.minecraft.server.World.entityJoinedWorld(World.java:1198)
            at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
            at net.minecraft.server.World.playerJoinedWorld(World.java:1180)
            at net.minecraft.server.World.cleanUp(World.java:1104)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:447)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  27. Offline

    Geoff Winans

    Not at all.

    there is absolutely no limit to the number of messages per node.

    format is:

    PVP:
    - '%player% did something to %opponent%!'
    - '%player% did something else to %opponent%!'
    - '%opponent% met %player% on the field of battle. Got beat down.'

    If you happen to use apostrophes in the sentence, surround the text with double quotes instead of singles.

    This indicates one of the expected nodes is missing/empty. If you updated to 0.8 from anything prior to 0.8, you'll need to either wipe the config.yml or add:

    Spider:
    - '....'
    - '....'

    Where '....' is your own custom message.

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

    Limstal

    Ah, thanks. That's definitely something I was doing wrong. I was trying to use double apostrophes inside the text out of Pascal habit, I'll see if that fixes the problem :)

    EDIT: Hold on, one of the default messages ('&E%player% &2got his ankles chewed off by &9%opponent%''s &CWolf!') uses the method I was using. Just spotted that I'm on version 0.7, has the download link been updated yet?
     
  29. Offline

    Geoff Winans

    The download link is always up to date with the latest version. It should pull from github.

    And yes, it technically should work with double apostrophes inside.
     
  30. Offline

    Ture

    Hmm, just found that the version I downloaded as 0.8 seems to be 0.7. Downloaded again, still it's 0.7. Deleted the config.yml and the fresh file has no Spider section. Downloaded the complete tarball in case the file got stuck in my cache, but again. The version in there tells me it's 0.7.
     

Share This Page