Percentage Hearts

Discussion in 'Archived: Plugin Requests' started by Lostminecraft, Aug 1, 2013.

  1. Offline

    Lostminecraft

    What I want: Okay, I want is to only show 1 row of hearts, (10) instead of showing how much hearts a player actually has (hp) Due to permission health and lore attributes I can modify a players hp, but this also causes one problem which it clutters your screen with all your hearts. What I want instead is just a percentage of how many hearts you have in one row. Example I have 50 hp, I dont want 3 1/2 rows of heart to be shown, showing me the exact number of hp I have but instead, just 1 row with the percentage.

    Ideas for commands: There should be none :D

    When I'd like it by: Take your time (Quality over Quantity)

    Anyways if you wanted to skype and talk that would be cool @ legendeternality

    thanks again for your time :D

    I'll be using Lore Attributes and Permissions-health
     
  2. Offline

    Xerfox

    You are talking about the HP bar under a player's name using the ./scoreboard command correct? Or are you talking about the health bar by your hotbar, and your hunger?
     
  3. Offline

    Lostminecraft


    Im not talking about any external plugins... Im talking about the rows of hearts, the actual hearts...
     
  4. Offline

    Xerfox

    Unfortunately, as far as I am concerned, it is impossible to do that in a plugin. I would recommend creating a resource pack for your server. You can now animate blocks in resource packs so you could most likely find a way to do that. Sorry man! Lostminecraft
     
  5. Offline

    Lostminecraft

    ???
    Im pretty sure it's possible by the way, and a resource pack wouldn't do what I want, Also what are you talking about? Im not talking about blocks... I'm starting to wonder if you even read my request. I would not ask for a plugin that I know is impossible... Maybe your skills just dont meet up to the task, its alright but I know that its not impossible.
     
  6. Offline

    foodyling

    Lostminecraft So essentially, you wan't a plugin that when you receive a lot of hearts, it just stays at 10 hearts and proportionalizes it?
     
  7. Offline

    Pawnguy7

    If by this you mean, it always shows in the range [0, 10], but is anywhere between 0, maxhealth, then it should be possible. I think you would need packets to tell the client, though.
     
  8. Offline

    daboross

    I think this would be possible with the new health scale API. I will try to make it.
     
  9. Offline

    Lostminecraft


    Thanks alot, do yo uhave skype? It would be easier to communicate like that, and I would like to know what your doing because I've been learning a bit of java myself, anyways I want to thank you for your efforts :D
     
  10. Offline

    daboross

    I do not have skype, it doesn't work well on linux _at all_. Do you have a Hangouts account?
     
  11. Offline

    Samthelord1

    Have you ever watched that program for kids called kimpossible? Take the k off.
     
  12. Offline

    Lostminecraft


    Now I do ;D @ [email protected]
     
  13. Offline

    daboross

  14. Offline

    Samthelord1

  15. Offline

    Taketheword

    This plugin is very possible and I am sorry that your lack of Java experience does not suit you here but this plugin is deffinantly doable and if no other developer will make it for him I'll do just that. Don't be so fast to say it's impossible just because you don't have enough experience or logic.
     
    graphiic1 and daboross like this.
  16. Offline

    Samthelord1

    Taketheword you joking? This is a new build that I didn't know about as I am away, if you had proper Java experience you'd know that 11 days ago this wouldn't have worked.
     
  17. Offline

    daboross

    Yet somehow you were the one who marked it off as impossible without even taking the time to read what I was saying.
    I did specifically state that this would be possible with the 'new health scale API'. I would at least look into a little what changes there have been recently when someone states that there is some new thing before being quick to make a remark on how it is impossible.

    At least some constructive criticism would have been nice. Even just saying 'Last time I checked' would have been better than just marking it off as impossible forever.
     
  18. Offline

    Samthelord1

    daboross I apologise to you, but someone saying I have no knowledge of Java... C'mon that's a bit low..
     
    timtower likes this.
  19. Offline

    daboross

    Samthelord1 I guess he was just sterotyping :p. You do have to admit that there are quite a few people who come on here without java knowledge. I don't know.
     
    AndyMcB1 likes this.
  20. Offline

    Lostminecraft


    I was going to ask, I got google hangouts on chrome How Would I add you so we can talk?
     
  21. Offline

    toothplck1

    Yeah definitely possible :p
     
  22. Offline

    SmellyPenguin

    May add this feature into my HealthPlus plugin ;)
     
  23. Offline

    Lostminecraft

  24. Offline

    RingOfStorms

    Would have been possible at any time since the new heart system, even before 11 days ago. You can send packets to the client very easily to make it show whatever the heck you want, meaning they could have 1,000 hearts and you can just send the display of 10.

    Heck, you can even use the boss HP bar for the player you're hitting, or even for your own health. Really doesn't matter as long as it is in a vanilla client and has a packet.
     
  25. Offline

    toothplck1

    Well not really, as every time vanilla sent the max health packets it would look like hell. In addition you would have to alter any health related packets as if the client recieves that it has more health than what it thinks it's max health is, it goes into a respawn screen. Also I am reasonably sure that Boss HP bars are displayed clientside by detecting how much health nearby boss mobs have, since its not done through packets so that would be exceeding difficult




    As for this plugin, would be really easy less than 10 lines if you don't include the package name and imports:

    Code:java
    1.  
    2. public class HealthPlugin extends JavaPlugin implements Listener {
    3. public void onEnable() {
    4. getServer().getPluginManager().registerEvents(this, this);
    5. }
    6. @EventHandler
    7. public void onJoin(PlayerJoinEvent event) {
    8. event.getPlayer().setHealthScale(20); // Can be any amount but this is to 1 row of hearts
    9. }
    10. }
    11.  
    12.  
     
  26. Offline

    RingOfStorms

    Boss exp bar isn't too bad, I explained a bit here: http://forums.bukkit.org/threads/stars-cops-wanted-level-from-gta.165186/
     
  27. Offline

    AndyMcB1

  28. Offline

    daboross

    I think that setScaleHealth sets the health 'scale', or what is displayed to the client no matter what the max health is.
     
  29. Offline

    RingOfStorms

    daboross is correct. The scale is what is shown to the client, while the max health is the real max health. I personally like the hearts, so I just don't even set it :3
     
  30. Offline

    AndyMcB1

    Yeah however the big fancy servers will use it to impress the 12 year olds :p
     

Share This Page