feat(plugin-api): allow to set tab header/footer
This commit is contained in:
1 parent
53aa958d90
commit
cddb7e3f6a
20 files changed
+468
-89
No files matched your search
@@ -13,7 +13,7 @@ interface boss-bar {
|
||||
white,
|
||||
}
|
||||
|
||||
/// Represents the division (notches) of a boss bar.
|
||||
/// Represents the notches/divisions of a boss bar.
|
||||
enum boss-bar-division {
|
||||
no-division,
|
||||
notches-6,
|
||||
@@ -22,6 +22,16 @@ interface boss-bar {
|
||||
notches-20,
|
||||
}
|
||||
|
||||
/// Metadata flags that can be toggled on a boss bar.
|
||||
record boss-bar-metadata {
|
||||
/// Darkens the sky for players who see the boss bar.
|
||||
darken-sky: bool,
|
||||
/// If true, the bar is considered a "dragon bar" (used for Ender Dragon).
|
||||
dragon-bar: bool,
|
||||
/// If true, fog is created around the players who see the boss bar.
|
||||
create-fog: bool,
|
||||
}
|
||||
|
||||
/// Represents a boss bar that can be shown to players.
|
||||
resource boss-bar {
|
||||
/// Creates a new boss bar.
|
||||
@@ -50,6 +60,12 @@ interface boss-bar {
|
||||
|
||||
/// Sets the division of this boss bar.
|
||||
set-division: func(division: boss-bar-division);
|
||||
|
||||
/// Returns the currently active metadata on this boss bar.
|
||||
get-metadata: func() -> boss-bar-metadata;
|
||||
|
||||
/// Updates the metadata on this boss bar.
|
||||
set-metadata: func(metadata: boss-bar-metadata);
|
||||
|
||||
/// Adds a player to this boss bar, making it visible to them.
|
||||
add-player: func(player: player);
|
||||
|
||||
Reference in new issue
Block a user