Skip to main content

CommandTextResolutionSource

Trait CommandTextResolutionSource 

Source
pub(crate) trait CommandTextResolutionSource {
    // Required methods
    fn selector_display_names(
        &self,
        selector: &str,
    ) -> Result<Vec<TextComponent>, CommandSyntaxError>;
    fn score_selector_names(
        &self,
        selector: &str,
    ) -> Result<Option<Vec<String>>, CommandSyntaxError>;
    fn score(
        &self,
        holder: &str,
        objective: &str,
    ) -> Result<Option<i32>, CommandSyntaxError>;
    fn nbt_source(
        &self,
        source: &NbtSource,
    ) -> Result<Vec<NbtTag>, CommandSyntaxError>;
}

Required Methods§

Source

fn selector_display_names( &self, selector: &str, ) -> Result<Vec<TextComponent>, CommandSyntaxError>

Source

fn score_selector_names( &self, selector: &str, ) -> Result<Option<Vec<String>>, CommandSyntaxError>

Source

fn score( &self, holder: &str, objective: &str, ) -> Result<Option<i32>, CommandSyntaxError>

Source

fn nbt_source( &self, source: &NbtSource, ) -> Result<Vec<NbtTag>, CommandSyntaxError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§