Skip to main content

PlayersHost

Trait PlayersHost 

pub trait PlayersHost {
    // Provided methods
    fn item_cooldown_group(&self, stack: &ItemStack) -> String { ... }
    fn player(&self, uuid: u128) -> Option<PlayerRef> { ... }
}
Expand description

The host’s methods both sides share of the players area, implemented by the game and reached through Host.

Provided Methods§

fn item_cooldown_group(&self, stack: &ItemStack) -> String

Side: both. ItemCooldowns.getCooldownGroup(stack): the group stack’s cooldown is filed under, the group its use_cooldown component names (its own, else its item’s default), else its item id.

fn player(&self, uuid: u128) -> Option<PlayerRef>

Side: both. Resolve a real online player by UUID, never a fake. A fake is reached through the handle returned by its factory. During a nested player swap, outer players whose records are displaced return None.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§