Struct omegga::Omegga [−][src]
pub struct Omegga {
pub awaiter_txs: Arc<DashMap<RequestId, Sender<Response>>>,
// some fields omitted
}
Fields
awaiter_txs: Arc<DashMap<RequestId, Sender<Response>>>
Implementations
Spawn the listener.
Write out an RPC notification.
Write out an RPC response.
Write out an RPC request.
Note: This does not internally expect a response from the server.
Prefer using request
over this for the ability to
await a response from the RPC server.
pub fn request(
&self,
method: impl Into<String>,
params: Option<Value>
) -> ResponseAwaiterⓘNotable traits for ResponseAwaiterimpl Future for ResponseAwaiter type Output = Result<Option<Value>, ResponseError>;
pub fn request(
&self,
method: impl Into<String>,
params: Option<Value>
) -> ResponseAwaiterⓘNotable traits for ResponseAwaiterimpl Future for ResponseAwaiter type Output = Result<Option<Value>, ResponseError>;
impl Future for ResponseAwaiter type Output = Result<Option<Value>, ResponseError>;
Request a response from the RPC server.
This returns a ResponseAwaiter
, a Future
that awaits a response.
Prints a message to the Omegga console in error color.
Prints a message to the Omegga console in info color.
Prints a message to the Omegga console in warn color.
Prints a message to the Omegga console in trace color.
Gets an object from the store.
Sets an object in the store.
Deletes an object from the store.
Wipes the store.
Gets a list of keys in the store.
Whispers a line to a user by their name.
Gets a list of all players.
Get all player positions.
Get the role setup.
Get the ban list.
Get a list of the server’s saves.
pub async fn get_save_path(
&self,
save: impl Into<String>
) -> Result<Option<String>, ResponseError>
pub async fn get_save_path(
&self,
save: impl Into<String>
) -> Result<Option<String>, ResponseError>
Get the path to a specific save.
Gets the server’s current save data as a brickadia-rs save object.
Clears a player’s bricks by their name.
Clear all bricks.
Save bricks to a named save.
Load a save, provided an offset in the world.
pub async fn read_save_data(
&self,
name: impl Into<String>
) -> Result<Option<SaveData>, ResponseError>
pub async fn read_save_data(
&self,
name: impl Into<String>
) -> Result<Option<SaveData>, ResponseError>
Reads a save (from a save file), and returns its data as a brickadia-rs save object.
Loads a save (from brickadia-rs save data) into the world, provided an offset.
Changes the map.
pub async fn get_player_permissions(
&self,
target: impl Into<String>
) -> Result<Value, ResponseError>
pub async fn get_player_permissions(
&self,
target: impl Into<String>
) -> Result<Value, ResponseError>
Get a player’s permissions.
pub async fn get_player_name_color(
&self,
target: impl Into<String>
) -> Result<Option<String>, ResponseError>
pub async fn get_player_name_color(
&self,
target: impl Into<String>
) -> Result<Option<String>, ResponseError>
Get a player’s name color (6-digit hexadecimal).
Get a player’s position.
pub async fn get_player_ghost_brick(
&self,
target: impl Into<String>
) -> Result<Option<GhostBrick>, ResponseError>
pub async fn get_player_ghost_brick(
&self,
target: impl Into<String>
) -> Result<Option<GhostBrick>, ResponseError>
Get a player’s ghost brick data.
pub async fn get_player_paint(
&self,
target: impl Into<String>
) -> Result<Option<PlayerPaint>, ResponseError>
pub async fn get_player_paint(
&self,
target: impl Into<String>
) -> Result<Option<PlayerPaint>, ResponseError>
Get a player’s paint data.
pub async fn get_player_template_bounds(
&self,
target: impl Into<String>
) -> Result<Option<TemplateBounds>, ResponseError>
pub async fn get_player_template_bounds(
&self,
target: impl Into<String>
) -> Result<Option<TemplateBounds>, ResponseError>
Get a player’s template bounds.
pub async fn get_player_template_bounds_data(
&self,
target: impl Into<String>
) -> Result<Option<SaveData>, ResponseError>
pub async fn get_player_template_bounds_data(
&self,
target: impl Into<String>
) -> Result<Option<SaveData>, ResponseError>
Get a player’s template data as a brickadia-rs save object.