[INACTIVE][MISC, CHAT] HealthyNames v0.4, colored names in chat based on health [733]

Discussion in 'Inactive/Unsupported Plugins' started by Bobby_Bonsai, Feb 17, 2011.

  1. Offline


    HealthyNames - colored names in chat based on health.
    Version: v0.4 [733]

    This plugin will change the color of the playernames in the chat based upon the health of the player. (Screenshot)

    Since v0.3 it's using a scheduled asynchronous thread (via BukkitScheduler, thanks to retsrif for telling me about it) with a ~80ms timeout.

    Created based on this request:

    • Colored names in chat based upon health

    Source Code

    Default configuration file (plugins/HealthyNames/config.yml) (open)
    # Health : Color
    0: 4
    1: 4
    2: 4
    3: 4
    4: 4
    5: 4
    6: 12
    7: 12
    8: 12
    9: 12
    10: 12
    11: 14
    12: 14
    13: 14
    14: 14
    15: 14
    17: 10
    16: 10
    19: 10
    18: 10
    20: 10

    Colors (open)
    BLACK: 0
    DARK_BLUE: 1
    DARK_AQUA: 3
    DARK_RED: 4
    GOLD: 6
    GRAY: 7
    DARK_GRAY: 8
    BLUE: 9
    GREEN: 10
    AQUA: 11
    RED: 12
    YELLOW: 14
    WHITE: 15

    Changelog (open)

    Version 0.4 (Download) [733]
    • Fixed compatibility with 733
    • Added support for cake and cookies
    • Fixed wrong color on respawn
    • Possibly fixed MultiVerse support (not sure)
    Version 0.3 (Download) [439]
    • Fixed wrong color on respawn
    • Added support for items (food)
    Version 0.2 (Download) [439]
    • Fixed TSLPC
    • Fixed crash at startup (build 439)
    • Fixed compatibility (build 439)
    Version 0.1 (Download) [ ? ]
    • First Version

    Planned Features:
    • None so far...

    Known Bugs:
    • Changing worlds (multiverse) reverts the color to white (possible fix with v0.4)
  2. Offline


    Can you give us a visual example of how this plugin works? At first I thought it was similar to the healthbar plugin made by Nijk
  3. Offline


  4. Offline


    Download SaveStopper :p
  5. Offline


    @EvilSeph: Oh damn, now I remember why I don't like Copy & Paste. ;P
  6. Offline


    im getting ENTITY_DAMAGEBY_BLOCK <is it up to date?> when using this plugin :/
  7. Offline


    Same issue here!
  8. Offline


    its a simple fix. From what i read, *entity_damageby_block* means when sand or gravel suffocates you, this action occurs....lol thats the only block-listener command i know. [​IMG]
  9. Offline


    I'd love to see this getting updated. I know that there is another mod that adds a healthbar to the chat but I don't like to waste space fot the additional information. Your plugin suited my needs just perfectly!
  10. Offline


    Mine still works fine on 435 with ichat
  11. Offline


    Version 0.2 is out, it now works with build 439 (MC 1.3).

    @chernobyl360: You're right, these events were removed in newer versions.

    @Vaupell: Really? Impressive. I could have sworn it wouldn't work because it crashes before it can load the configuration.
  12. Offline


    Nice, works again :)
  13. Offline



    Great plugin! Just one little problem - the color doesn't update when player heals theirselves with food.
    Running on Linux 38115.vs.webtropia.com 2.6.18-028stab079.1 #1 SMP Sat Nov 27 00:29:50 MSK 2010 x86_64 GNU/Linux
    CraftBukkit version 450
    Running plugins:
    • Essentials
    • EssentialsBan
    • EssentialsGroupBridge
    • EssentialsGroupManager
    • EssentialsHelp
    • EssentialsProtect
    • EssentialsServerlist
    • EssentialsSpawn
    • EssentialsTele
    • HealthyNames
    • MyHome
    • MyWarp
    Keep up the good work :)
  14. Offline


    @VesQ. Thank you. :D

    And yes, that could very well be, I'll investigate it.
  15. Offline


    potential flaw: using /heal from worldedit did not update the color.. damaging self again fixes
    not vital, just fyi
    shouldn't be using /heal, anyway

    edit: using slowheal, which must be using the same methods, because colors don't update for that, either
  16. Offline


    @VesQ, @jascotty2: I couldn't find a generic health-changed event, so I can only listen to the use-event for items, and see if the player just used food. The problem is that I can't handle commands from other plugins in any form, because they're completely circumventing every event I could listen to, sorry.

    At the moment I'm even out of luck with the food because the events fire too early (Player health was not updated at this point). :(
    I'll have to investigate this further.
  17. Offline


    I'm looking forward to this maturing. I'm using healthbar with ichat right now, but it takes up a lot of space. This would be a great alternative.
  18. Offline


    @VesQ, @jasonznack: Version 0.3 is out, it adds support for food and fixes the wrong color at respawn.

    @jascotty2: Sorry, but there is no generic event for health changes, and I can't capture commands from other plugins.
  19. Offline


    If you eat a cake, the color does not update!
  20. Offline


    @Maskur: Yes, you're right. I missed that cake is eaten by placing it and using it afterwards. Which means I'll have to add a BlockListener, too. I'm impressed how complicated such simple plugins can get.
  21. Offline


    Sorry to bother you again, but when using the MultiVersum Plugin and travelling to another world the color changes back to white.
  22. Offline


    @Maskur: No Problem, I'll have a look at this, too.
  23. Offline

    Steve Member

    API changes breaks this plugin:
    00:21:43 [SEVERE] PLAYER_ITEM loading HealthyNames v0.3 (Is it up to date?)
    java.lang.NoSuchFieldError: PLAYER_ITEM
            at org.bonsaimind.bukkitplugins.HealthyNames.onEnable(HealthyNames.java:63)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
  24. Offline


    please update
  25. Offline


    Would anyone consider taking over? This is a cool idea, especially for RP-style servers.
  26. Offline


    @Bjourk: Or you could just ask if I could update this. ;) For some reason I missed this one completely. Anyway, your ping was enough to remind me...v0.4 is out.
  27. Offline


    Oh, cool OK. Yeah I guess I kind of assumed you had abandoned this one like so may other devs do after a while.
    I think this'll be going on my server when I get it all ported to 733.
  28. Offline


    Naaahhh...I've just gotten lazy if it comes to updating the plugins. Also most of my thoughts at the moment are around SpawnRandomizer, since I'm doing a rewrite with all necessary features (support for specified areas, multiple worlds, different target worlds etc.).
  29. Offline


    You should link your plugins in your sig!
  30. Offline


    True, done.

Share This Page