Class GlowBoss

All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.attribute.Attributable, org.bukkit.command.CommandSender, org.bukkit.entity.Boss, org.bukkit.entity.Creature, org.bukkit.entity.Damageable, org.bukkit.entity.Entity, org.bukkit.entity.LivingEntity, org.bukkit.entity.Mob, org.bukkit.entity.Monster, org.bukkit.loot.Lootable, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder, org.bukkit.projectiles.ProjectileSource
Direct Known Subclasses:
GlowEnderDragon, GlowWither

public class GlowBoss extends GlowMonster implements org.bukkit.entity.Boss
A monster with a boss bar.
  • Field Details

    • bossBar

      protected final org.bukkit.boss.BossBar bossBar
  • Constructor Details

    • GlowBoss

      public GlowBoss(org.bukkit.Location loc, org.bukkit.entity.EntityType type, double maxHealth, String title, org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... barFlags)
      Creates a new boss.
      Parameters:
      loc - The location of the non-passive mob.
      type - The type of mob.
      maxHealth - The max health for this mob.
      title - The boss bar title. TODO: i18n
      color - The boss bar color.
      style - The boss bar style.
      barFlags - Flags controlling the boss bar.
    • GlowBoss

      public GlowBoss(org.bukkit.Location loc, org.bukkit.entity.EntityType type, double maxHealth, org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... barFlags)
      Creates a new boss, whose boss-bar title is equal to its type name.
      Parameters:
      loc - The location of the non-passive mob.
      type - The type of mob.
      maxHealth - The max health for this mob.
      color - The boss bar color.
      style - The boss bar style.
      barFlags - Flags controlling the boss bar.
  • Method Details

    • teleport

      public boolean teleport(org.bukkit.Location location)
      Specified by:
      teleport in interface org.bukkit.entity.Entity
      Overrides:
      teleport in class GlowEntity
    • remove

      public void remove()
      Description copied from class: GlowEntity
      Destroys this entity by removing it from the world and marking it as not being active.
      Specified by:
      remove in interface org.bukkit.entity.Entity
      Overrides:
      remove in class GlowEntity
    • addBarToPlayer

      public void addBarToPlayer(org.bukkit.entity.Player player)
      Adds this boss's bar for the given player.
      Parameters:
      player - the player who should see this bar
    • getBossBar

      public org.bukkit.boss.BossBar getBossBar()
      Specified by:
      getBossBar in interface org.bukkit.entity.Boss