pub trait Context:
PlayerContext
+ ChatContext
+ WorldContext
+ EntityContext
+ ContainerContext
+ RecipeContext {
// Required methods
fn logger(&self) -> PluginLogger;
fn player(&self) -> &dyn PlayerContext;
fn chat(&self) -> &dyn ChatContext;
fn world_ctx(&self) -> &dyn WorldContext;
fn entities(&self) -> &dyn EntityContext;
fn containers(&self) -> &dyn ContainerContext;
fn recipes(&self) -> &dyn RecipeContext;
}Expand description
Execution context for commands and event handlers.
Provides sub-context accessors for domain-specific operations.
Implemented by ServerContext (in basalt-server) and potentially
ConsoleContext (server terminal) in the future.
Required Methods§
Sourcefn logger(&self) -> PluginLogger
fn logger(&self) -> PluginLogger
Returns a logger scoped to the current plugin.
Sourcefn player(&self) -> &dyn PlayerContext
fn player(&self) -> &dyn PlayerContext
Access player identity and state.
Sourcefn chat(&self) -> &dyn ChatContext
fn chat(&self) -> &dyn ChatContext
Access chat and messaging.
Sourcefn world_ctx(&self) -> &dyn WorldContext
fn world_ctx(&self) -> &dyn WorldContext
Access world, blocks, chunks, and persistence.
Sourcefn entities(&self) -> &dyn EntityContext
fn entities(&self) -> &dyn EntityContext
Access entity management.
Sourcefn containers(&self) -> &dyn ContainerContext
fn containers(&self) -> &dyn ContainerContext
Access container interaction.
Sourcefn recipes(&self) -> &dyn RecipeContext
fn recipes(&self) -> &dyn RecipeContext
Access the current player’s recipe-book state.