Class BossBarTrait

java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.BossBarTrait
All Implemented Interfaces:
Runnable, Listener

public class BossBarTrait extends Trait
  • Constructor Details

    • BossBarTrait

      public BossBarTrait()
  • Method Details

    • getColor

      public BarColor getColor()
    • getFlags

      public List<BarFlag> getFlags()
    • getRange

      public int getRange()
    • getStyle

      public BarStyle getStyle()
    • getTitle

      public String getTitle()
    • getTrackingVariable

      public String getTrackingVariable()
    • getViewPermission

      public String getViewPermission()
    • isVisible

      public boolean isVisible()
    • onDespawn

      public void onDespawn()
      Description copied from class: Trait
      Called just before the attached NPC is despawned. NPC.getEntity() will be non-null.
      Overrides:
      onDespawn in class Trait
    • onRemove

      public void onRemove()
      Description copied from class: Trait
      Called when a trait is removed from the attached NPC.
      Overrides:
      onRemove in class Trait
    • run

      public void run()
      Description copied from class: Trait
      Called every tick if overridden.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Trait
    • setColor

      public void setColor(BarColor color)
    • setFlags

      public void setFlags(Collection<BarFlag> flags)
    • setFlags

      public void setFlags(List<BarFlag> flags)
    • setProgressProvider

      public void setProgressProvider(Supplier<Double> provider)
    • setRange

      public void setRange(int range)
    • setStyle

      public void setStyle(BarStyle style)
    • setTitle

      public void setTitle(String title)
    • setTrackVariable

      public void setTrackVariable(String variable)
    • setViewPermission

      public void setViewPermission(String viewpermission)
    • setVisible

      public void setVisible(boolean visible)
    • bossbar

      public static void bossbar(CommandContext args, CommandSender sender, NPC npc, BarStyle style, String track, BarColor color, Boolean visible, Integer range, String title, String flags, String viewpermission) throws CommandException
      Throws:
      CommandException