Ender Dragon Health Bar

Discussion in 'Plugin Development' started by NicksTheBoss, Feb 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    NicksTheBoss

    I want a custom ender dragon health bar. I never used this before but I decided to step into it and learn how to make one. I'm doing this for my survival games plugin and I want the top to say, "There are 24/24 tributes remaining." and I want it to update as it goes. All I need is the bar and then I can edit the text for it to update the tributes, etc, etc.
     
    mar4444 likes this.
  2. You have an enderdragon spawned under bedrock in that world and just name the enderdragon what you need.

    EDIT: Also, when is SG all in one coming, are are you making SG plus?
     
  3. Offline

    BaconStripzMan

    NicksTheBoss Implement BarAPI (http://dev.bukkit.org/bukkit-plugins/bar-api) into your plugin. I assume everyone in game is in an ArrayList if not make it when the game starts to add them to one then do:
    Code:java
    1. public void onPlayerDeath(PlayerDeathEvent e){
    2. BarAPI.setMessage("There are " + ingame.size() " tributes remaining");
    3. }

    And if you don't put your Events in your main class put
    Code:java
    1. private (Your Main Class Name) Main;
    2.  
    3. //And insted of the old BarAPI thing:
    4. BarAPI.setMessage("There are " Main.ingame.size() + " tributes left.")
     
  4. Offline

    NicksTheBoss

    BaconStripzMan So with this BarAPI I don't have to spawn in a ender dragon under bedrock?
     
  5. Offline

    naorpeled

    No, you dont.
     
  6. Offline

    NicksTheBoss

Thread Status:
Not open for further replies.

Share This Page