Skip to main content

MobsServerHost

Trait MobsServerHost 

pub trait MobsServerHost {
    // Provided methods
    fn kill_mob(&mut self, dimension: &str, id: u32) -> bool { ... }
    fn dragon(&self, entity: EntityRef) -> Option<DragonRef> { ... }
}
Expand description

The server host’s methods of the mobs area, implemented by the game and reached through ServerHost.

Provided Methods§

fn kill_mob(&mut self, dimension: &str, id: u32) -> bool

Side: server. Kills mob id as /kill does: it falls and drops its loot. False for no such living mob or another dimension.

fn dragon(&self, entity: EntityRef) -> Option<DragonRef>

Side: server. The entity as the ender dragon, or None for another kind, a stale handle or a client.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§