Trait BossBarsServerHost
pub trait BossBarsServerHost {
// Provided methods
fn boss_bar(&self, id: &str) -> Option<BossBarRef> { ... }
fn boss_bars(&self) -> Vec<BossBarRef> { ... }
fn create_boss_bar(
&mut self,
id: &str,
name: Text,
) -> Result<Option<BossBarRef>, TextFormError> { ... }
}Expand description
The server host’s methods of the boss_bars area, implemented by the game and reached through ServerHost.
Provided Methods§
fn boss_bar(&self, id: &str) -> Option<BossBarRef>
fn boss_bar(&self, id: &str) -> Option<BossBarRef>
Side: server.
An existing custom boss bar by id (minecraft: when no namespace), or
None. Saved bars are there from the world’s start, as vanilla’s
CustomBossEvents. Boss bars of mobs and raids are not custom boss
events.
fn boss_bars(&self) -> Vec<BossBarRef>
fn boss_bars(&self) -> Vec<BossBarRef>
Side: server.
Every custom boss bar, in the order /bossbar list shows them.
fn create_boss_bar(
&mut self,
id: &str,
name: Text,
) -> Result<Option<BossBarRef>, TextFormError>
fn create_boss_bar( &mut self, id: &str, name: Text, ) -> Result<Option<BossBarRef>, TextFormError>
Side: server.
/bossbar add: a new bar, visible, white, progress, at 0 of 100, with
nobody added. None if the id is taken or invalid, or outside a server.
Refuses text deeper than 512 component nodes before applying any changes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".