Package net.citizensnpcs.trait.versioned
Class BossBarTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.BossBarTrait
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
bossbar
(CommandContext args, CommandSender sender, NPC npc, BarStyle style, String track, BarColor color, Boolean visible, Integer range, String title, String flags, String viewpermission) getColor()
getFlags()
int
getRange()
getStyle()
getTitle()
boolean
void
Called just before the attachedNPC
is despawned.void
onRemove()
Called when a trait is removed from the attachedNPC
.void
run()
Called every tick if overridden.void
void
setFlags
(Collection<BarFlag> flags) void
void
setProgressProvider
(Supplier<Double> provider) void
setRange
(int range) void
void
void
setTrackVariable
(String variable) void
setViewPermission
(String viewpermission) void
setVisible
(boolean visible)
-
Constructor Details
-
BossBarTrait
public BossBarTrait()
-
-
Method Details
-
getColor
-
getFlags
-
getRange
public int getRange() -
getStyle
-
getTitle
-
getTrackingVariable
-
getViewPermission
-
isVisible
public boolean isVisible() -
onDespawn
public void onDespawn()Description copied from class:Trait
Called just before the attachedNPC
is despawned.NPC.getEntity()
will be non-null. -
onRemove
public void onRemove()Description copied from class:Trait
Called when a trait is removed from the attachedNPC
. -
run
public void run()Description copied from class:Trait
Called every tick if overridden. -
setColor
-
setFlags
-
setFlags
-
setProgressProvider
-
setRange
public void setRange(int range) -
setStyle
-
setTitle
-
setTrackVariable
-
setViewPermission
-
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
-