Skip to content

BossBars

Namespace Mc.Scripting · Kind class (sealed)

public sealed class BossBars

Creates boss bars owned by a plugin (plugin.BossBars).

Member Description
Create Creates a boss bar with nobody watching; add viewers to show it.
public BossBar Create(string name, Component title, BossBarColor color = BossBarColor.Pink, BossBarStyle style = BossBarStyle.Solid, float progress = 1f)

Creates a boss bar with nobody watching; add viewers to show it.

Parameters

Name Type Description
name string A name unique within the plugin (letters, digits, _ - . /); the bar’s key becomes “pluginid:name”.
title Component The text above the bar.
color BossBarColor = BossBarColor.Pink The colour.
style BossBarStyle = BossBarStyle.Solid The segmentation.
progress float = 1f How full the bar is, 0..1.

Returns BossBar: The bar.

Throws

  • System.InvalidOperationException: A bar with this name already exists.

BossBar · BossBarColor · BossBarStyle · Component