pub struct Server {
pub plugin_id: String,
pub sender: Sender<PluginToHost>,
}Fields§
§plugin_id: String§sender: Sender<PluginToHost>Implementations§
Source§impl Server
impl Server
Sourcepub async fn send_chat(
&self,
target_uuid: String,
message: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_chat( &self, target_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>
Sends a SendChat action to the server.
Sourcepub async fn teleport(
&self,
player_uuid: String,
position: impl Into<Option<Vec3>>,
rotation: impl Into<Option<Vec3>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn teleport( &self, player_uuid: String, position: impl Into<Option<Vec3>>, rotation: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>
Sends a Teleport action to the server.
Sourcepub async fn kick(
&self,
player_uuid: String,
reason: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn kick( &self, player_uuid: String, reason: String, ) -> Result<(), SendError<PluginToHost>>
Sends a Kick action to the server.
Sourcepub async fn set_game_mode(
&self,
player_uuid: String,
game_mode: GameMode,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_game_mode( &self, player_uuid: String, game_mode: GameMode, ) -> Result<(), SendError<PluginToHost>>
Sends a SetGameMode action to the server.
Sourcepub async fn give_item(
&self,
player_uuid: String,
item: impl Into<Option<ItemStack>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn give_item( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>
Sends a GiveItem action to the server.
Sourcepub async fn clear_inventory(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn clear_inventory( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a ClearInventory action to the server.
Sourcepub async fn set_held_item(
&self,
player_uuid: String,
main: impl Into<Option<ItemStack>>,
offhand: impl Into<Option<ItemStack>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_held_item( &self, player_uuid: String, main: impl Into<Option<ItemStack>>, offhand: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>
Sends a SetHeldItem action to the server.
Sourcepub async fn player_set_armour(
&self,
player_uuid: String,
helmet: impl Into<Option<ItemStack>>,
chestplate: impl Into<Option<ItemStack>>,
leggings: impl Into<Option<ItemStack>>,
boots: impl Into<Option<ItemStack>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_armour( &self, player_uuid: String, helmet: impl Into<Option<ItemStack>>, chestplate: impl Into<Option<ItemStack>>, leggings: impl Into<Option<ItemStack>>, boots: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetArmour action to the server.
Sourcepub async fn player_open_block_container(
&self,
player_uuid: String,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_open_block_container( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerOpenBlockContainer action to the server.
Sourcepub async fn player_drop_item(
&self,
player_uuid: String,
item: impl Into<Option<ItemStack>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_drop_item( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerDropItem action to the server.
Sourcepub async fn player_set_item_cooldown(
&self,
player_uuid: String,
item: impl Into<Option<ItemStack>>,
duration_ms: i64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_item_cooldown( &self, player_uuid: String, item: impl Into<Option<ItemStack>>, duration_ms: i64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetItemCooldown action to the server.
Sourcepub async fn set_health(
&self,
player_uuid: String,
health: f64,
max_health: impl Into<Option<f64>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_health( &self, player_uuid: String, health: f64, max_health: impl Into<Option<f64>>, ) -> Result<(), SendError<PluginToHost>>
Sends a SetHealth action to the server.
Sourcepub async fn set_food(
&self,
player_uuid: String,
food: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_food( &self, player_uuid: String, food: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a SetFood action to the server.
Sourcepub async fn set_experience(
&self,
player_uuid: String,
level: impl Into<Option<i32>>,
progress: impl Into<Option<f32>>,
amount: impl Into<Option<i32>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_experience( &self, player_uuid: String, level: impl Into<Option<i32>>, progress: impl Into<Option<f32>>, amount: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>
Sends a SetExperience action to the server.
Sourcepub async fn set_velocity(
&self,
player_uuid: String,
velocity: impl Into<Option<Vec3>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn set_velocity( &self, player_uuid: String, velocity: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>
Sends a SetVelocity action to the server.
Sourcepub async fn add_effect(
&self,
player_uuid: String,
effect_type: EffectType,
level: i32,
duration_ms: i64,
show_particles: bool,
) -> Result<(), SendError<PluginToHost>>
pub async fn add_effect( &self, player_uuid: String, effect_type: EffectType, level: i32, duration_ms: i64, show_particles: bool, ) -> Result<(), SendError<PluginToHost>>
Sends a AddEffect action to the server.
Sourcepub async fn remove_effect(
&self,
player_uuid: String,
effect_type: EffectType,
) -> Result<(), SendError<PluginToHost>>
pub async fn remove_effect( &self, player_uuid: String, effect_type: EffectType, ) -> Result<(), SendError<PluginToHost>>
Sends a RemoveEffect action to the server.
Sourcepub async fn send_title(
&self,
player_uuid: String,
title: String,
subtitle: impl Into<Option<String>>,
fade_in_ms: impl Into<Option<i64>>,
duration_ms: impl Into<Option<i64>>,
fade_out_ms: impl Into<Option<i64>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_title( &self, player_uuid: String, title: String, subtitle: impl Into<Option<String>>, fade_in_ms: impl Into<Option<i64>>, duration_ms: impl Into<Option<i64>>, fade_out_ms: impl Into<Option<i64>>, ) -> Result<(), SendError<PluginToHost>>
Sends a SendTitle action to the server.
Sourcepub async fn send_popup(
&self,
player_uuid: String,
message: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_popup( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>
Sends a SendPopup action to the server.
Sourcepub async fn send_tip(
&self,
player_uuid: String,
message: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_tip( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>
Sends a SendTip action to the server.
Sourcepub async fn player_send_toast(
&self,
player_uuid: String,
title: String,
message: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_toast( &self, player_uuid: String, title: String, message: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendToast action to the server.
Sourcepub async fn player_send_jukebox_popup(
&self,
player_uuid: String,
message: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_jukebox_popup( &self, player_uuid: String, message: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendJukeboxPopup action to the server.
Sourcepub async fn player_show_coordinates(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_show_coordinates( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerShowCoordinates action to the server.
Sourcepub async fn player_hide_coordinates(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_hide_coordinates( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerHideCoordinates action to the server.
Sourcepub async fn player_enable_instant_respawn(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_enable_instant_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerEnableInstantRespawn action to the server.
Sourcepub async fn player_disable_instant_respawn(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_disable_instant_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerDisableInstantRespawn action to the server.
Sourcepub async fn player_set_name_tag(
&self,
player_uuid: String,
name_tag: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_name_tag( &self, player_uuid: String, name_tag: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetNameTag action to the server.
Sourcepub async fn player_set_score_tag(
&self,
player_uuid: String,
score_tag: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_score_tag( &self, player_uuid: String, score_tag: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetScoreTag action to the server.
Sourcepub async fn play_sound(
&self,
player_uuid: String,
sound: Sound,
position: impl Into<Option<Vec3>>,
volume: impl Into<Option<f32>>,
pitch: impl Into<Option<f32>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn play_sound( &self, player_uuid: String, sound: Sound, position: impl Into<Option<Vec3>>, volume: impl Into<Option<f32>>, pitch: impl Into<Option<f32>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlaySound action to the server.
Sourcepub async fn player_show_particle(
&self,
player_uuid: String,
position: impl Into<Option<Vec3>>,
particle: ParticleType,
block: impl Into<Option<BlockState>>,
face: impl Into<Option<i32>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_show_particle( &self, player_uuid: String, position: impl Into<Option<Vec3>>, particle: ParticleType, block: impl Into<Option<BlockState>>, face: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerShowParticle action to the server.
Sourcepub async fn player_send_scoreboard(
&self,
player_uuid: String,
title: String,
lines: Vec<String>,
padding: impl Into<Option<bool>>,
descending: impl Into<Option<bool>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_scoreboard( &self, player_uuid: String, title: String, lines: Vec<String>, padding: impl Into<Option<bool>>, descending: impl Into<Option<bool>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendScoreboard action to the server.
Sourcepub async fn player_remove_scoreboard(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_remove_scoreboard( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerRemoveScoreboard action to the server.
Sends a PlayerSendMenuForm action to the server.
Sourcepub async fn player_send_modal_form(
&self,
player_uuid: String,
title: String,
body: String,
yes_text: String,
no_text: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_modal_form( &self, player_uuid: String, title: String, body: String, yes_text: String, no_text: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendModalForm action to the server.
Sourcepub async fn player_send_dialogue(
&self,
player_uuid: String,
title: String,
body: impl Into<Option<String>>,
buttons: Vec<String>,
entity: impl Into<Option<EntityRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_dialogue( &self, player_uuid: String, title: String, body: impl Into<Option<String>>, buttons: Vec<String>, entity: impl Into<Option<EntityRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendDialogue action to the server.
Sourcepub async fn player_close_dialogue(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_close_dialogue( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerCloseDialogue action to the server.
Sourcepub async fn player_close_form(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_close_form( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerCloseForm action to the server.
Sourcepub async fn execute_command(
&self,
player_uuid: String,
command: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn execute_command( &self, player_uuid: String, command: String, ) -> Result<(), SendError<PluginToHost>>
Sends a ExecuteCommand action to the server.
Sourcepub async fn player_start_sprinting(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_sprinting( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartSprinting action to the server.
Sourcepub async fn player_stop_sprinting(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_sprinting( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopSprinting action to the server.
Sourcepub async fn player_start_sneaking(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_sneaking( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartSneaking action to the server.
Sourcepub async fn player_stop_sneaking(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_sneaking( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopSneaking action to the server.
Sourcepub async fn player_start_swimming(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_swimming( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartSwimming action to the server.
Sourcepub async fn player_stop_swimming(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_swimming( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopSwimming action to the server.
Sourcepub async fn player_start_crawling(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_crawling( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartCrawling action to the server.
Sourcepub async fn player_stop_crawling(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_crawling( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopCrawling action to the server.
Sourcepub async fn player_start_gliding(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_gliding( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartGliding action to the server.
Sourcepub async fn player_stop_gliding(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_gliding( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopGliding action to the server.
Sourcepub async fn player_start_flying(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_start_flying( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStartFlying action to the server.
Sourcepub async fn player_stop_flying(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_stop_flying( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerStopFlying action to the server.
Sourcepub async fn player_set_immobile(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_immobile( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetImmobile action to the server.
Sourcepub async fn player_set_mobile(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_mobile( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetMobile action to the server.
Sourcepub async fn player_set_speed(
&self,
player_uuid: String,
speed: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_speed( &self, player_uuid: String, speed: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetSpeed action to the server.
Sourcepub async fn player_set_flight_speed(
&self,
player_uuid: String,
flight_speed: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_flight_speed( &self, player_uuid: String, flight_speed: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetFlightSpeed action to the server.
Sourcepub async fn player_set_vertical_flight_speed(
&self,
player_uuid: String,
vertical_flight_speed: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_vertical_flight_speed( &self, player_uuid: String, vertical_flight_speed: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetVerticalFlightSpeed action to the server.
Sourcepub async fn player_set_absorption(
&self,
player_uuid: String,
absorption: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_absorption( &self, player_uuid: String, absorption: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetAbsorption action to the server.
Sourcepub async fn player_set_on_fire(
&self,
player_uuid: String,
duration_ms: i64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_on_fire( &self, player_uuid: String, duration_ms: i64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetOnFire action to the server.
Sourcepub async fn player_extinguish(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_extinguish( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerExtinguish action to the server.
Sourcepub async fn player_set_invisible(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_invisible( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetInvisible action to the server.
Sourcepub async fn player_set_visible(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_visible( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetVisible action to the server.
Sourcepub async fn player_set_scale(
&self,
player_uuid: String,
scale: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_scale( &self, player_uuid: String, scale: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetScale action to the server.
Sourcepub async fn player_set_held_slot(
&self,
player_uuid: String,
slot: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_set_held_slot( &self, player_uuid: String, slot: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSetHeldSlot action to the server.
Sourcepub async fn player_respawn(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_respawn( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerRespawn action to the server.
Sourcepub async fn player_transfer(
&self,
player_uuid: String,
address: impl Into<Option<Address>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_transfer( &self, player_uuid: String, address: impl Into<Option<Address>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerTransfer action to the server.
Sourcepub async fn player_knock_back(
&self,
player_uuid: String,
source: impl Into<Option<Vec3>>,
force: f64,
height: f64,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_knock_back( &self, player_uuid: String, source: impl Into<Option<Vec3>>, force: f64, height: f64, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerKnockBack action to the server.
Sourcepub async fn player_swing_arm(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_swing_arm( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSwingArm action to the server.
Sourcepub async fn player_punch_air(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_punch_air( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerPunchAir action to the server.
Sourcepub async fn player_send_boss_bar(
&self,
player_uuid: String,
text: String,
health_percentage: impl Into<Option<f32>>,
colour: impl Into<Option<BossBarColour>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_send_boss_bar( &self, player_uuid: String, text: String, health_percentage: impl Into<Option<f32>>, colour: impl Into<Option<BossBarColour>>, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerSendBossBar action to the server.
Sourcepub async fn player_remove_boss_bar(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_remove_boss_bar( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerRemoveBossBar action to the server.
Sourcepub async fn player_show_hud_element(
&self,
player_uuid: String,
element: HudElement,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_show_hud_element( &self, player_uuid: String, element: HudElement, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerShowHudElement action to the server.
Sourcepub async fn player_hide_hud_element(
&self,
player_uuid: String,
element: HudElement,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_hide_hud_element( &self, player_uuid: String, element: HudElement, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerHideHudElement action to the server.
Sourcepub async fn player_open_sign(
&self,
player_uuid: String,
position: impl Into<Option<BlockPos>>,
front_side: bool,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_open_sign( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, front_side: bool, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerOpenSign action to the server.
Sourcepub async fn player_edit_sign(
&self,
player_uuid: String,
position: impl Into<Option<BlockPos>>,
front_text: String,
back_text: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_edit_sign( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, front_text: String, back_text: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerEditSign action to the server.
Sourcepub async fn player_turn_lectern_page(
&self,
player_uuid: String,
position: impl Into<Option<BlockPos>>,
page: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_turn_lectern_page( &self, player_uuid: String, position: impl Into<Option<BlockPos>>, page: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerTurnLecternPage action to the server.
Sourcepub async fn player_hide_player(
&self,
player_uuid: String,
target_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_hide_player( &self, player_uuid: String, target_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerHidePlayer action to the server.
Sourcepub async fn player_show_player(
&self,
player_uuid: String,
target_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_show_player( &self, player_uuid: String, target_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerShowPlayer action to the server.
Sourcepub async fn player_remove_all_debug_shapes(
&self,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn player_remove_all_debug_shapes( &self, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a PlayerRemoveAllDebugShapes action to the server.
Sourcepub async fn world_set_default_game_mode(
&self,
world: impl Into<Option<WorldRef>>,
game_mode: GameMode,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_default_game_mode( &self, world: impl Into<Option<WorldRef>>, game_mode: GameMode, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetDefaultGameMode action to the server.
Sourcepub async fn world_set_difficulty(
&self,
world: impl Into<Option<WorldRef>>,
difficulty: Difficulty,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_difficulty( &self, world: impl Into<Option<WorldRef>>, difficulty: Difficulty, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetDifficulty action to the server.
Sourcepub async fn world_set_tick_range(
&self,
world: impl Into<Option<WorldRef>>,
tick_range: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_tick_range( &self, world: impl Into<Option<WorldRef>>, tick_range: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetTickRange action to the server.
Sourcepub async fn world_set_block(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
block: impl Into<Option<BlockState>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_block( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, block: impl Into<Option<BlockState>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetBlock action to the server.
Sourcepub async fn world_play_sound(
&self,
world: impl Into<Option<WorldRef>>,
sound: Sound,
position: impl Into<Option<Vec3>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_play_sound( &self, world: impl Into<Option<WorldRef>>, sound: Sound, position: impl Into<Option<Vec3>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldPlaySound action to the server.
Sourcepub async fn world_add_particle(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<Vec3>>,
particle: ParticleType,
block: impl Into<Option<BlockState>>,
face: impl Into<Option<i32>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_add_particle( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<Vec3>>, particle: ParticleType, block: impl Into<Option<BlockState>>, face: impl Into<Option<i32>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldAddParticle action to the server.
Sourcepub async fn world_set_time(
&self,
world: impl Into<Option<WorldRef>>,
time: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_time( &self, world: impl Into<Option<WorldRef>>, time: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetTime action to the server.
Sourcepub async fn world_stop_time(
&self,
world: impl Into<Option<WorldRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_stop_time( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldStopTime action to the server.
Sourcepub async fn world_start_time(
&self,
world: impl Into<Option<WorldRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_start_time( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldStartTime action to the server.
Sourcepub async fn world_set_spawn(
&self,
world: impl Into<Option<WorldRef>>,
spawn: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_spawn( &self, world: impl Into<Option<WorldRef>>, spawn: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetSpawn action to the server.
Sourcepub async fn world_set_biome(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
biome_id: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_biome( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, biome_id: String, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetBiome action to the server.
Sourcepub async fn world_set_liquid(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
liquid: impl Into<Option<LiquidState>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_set_liquid( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, liquid: impl Into<Option<LiquidState>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldSetLiquid action to the server.
Sourcepub async fn world_schedule_block_update(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
block: impl Into<Option<BlockState>>,
delay_ms: i64,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_schedule_block_update( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, block: impl Into<Option<BlockState>>, delay_ms: i64, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldScheduleBlockUpdate action to the server.
Sourcepub async fn world_build_structure(
&self,
world: impl Into<Option<WorldRef>>,
origin: impl Into<Option<BlockPos>>,
structure: impl Into<Option<StructureDef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_build_structure( &self, world: impl Into<Option<WorldRef>>, origin: impl Into<Option<BlockPos>>, structure: impl Into<Option<StructureDef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldBuildStructure action to the server.
Sourcepub async fn world_query_entities(
&self,
world: impl Into<Option<WorldRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_entities( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryEntities action to the server.
Sourcepub async fn world_query_players(
&self,
world: impl Into<Option<WorldRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_players( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryPlayers action to the server.
Sourcepub async fn world_query_entities_within(
&self,
world: impl Into<Option<WorldRef>>,
box: impl Into<Option<BBox>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_entities_within( &self, world: impl Into<Option<WorldRef>>, box: impl Into<Option<BBox>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryEntitiesWithin action to the server.
Sourcepub async fn world_query_player_spawn(
&self,
world: impl Into<Option<WorldRef>>,
player_uuid: String,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_player_spawn( &self, world: impl Into<Option<WorldRef>>, player_uuid: String, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryPlayerSpawn action to the server.
Sourcepub async fn world_query_block(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_block( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryBlock action to the server.
Sourcepub async fn world_query_biome(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_biome( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryBiome action to the server.
Sourcepub async fn world_query_light(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_light( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryLight action to the server.
Sourcepub async fn world_query_sky_light(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_sky_light( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQuerySkyLight action to the server.
Sourcepub async fn world_query_temperature(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_temperature( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryTemperature action to the server.
Sourcepub async fn world_query_highest_block(
&self,
world: impl Into<Option<WorldRef>>,
x: i32,
z: i32,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_highest_block( &self, world: impl Into<Option<WorldRef>>, x: i32, z: i32, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryHighestBlock action to the server.
Sourcepub async fn world_query_raining_at(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_raining_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryRainingAt action to the server.
Sourcepub async fn world_query_snowing_at(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_snowing_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQuerySnowingAt action to the server.
Sourcepub async fn world_query_thundering_at(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_thundering_at( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryThunderingAt action to the server.
Sourcepub async fn world_query_liquid(
&self,
world: impl Into<Option<WorldRef>>,
position: impl Into<Option<BlockPos>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_liquid( &self, world: impl Into<Option<WorldRef>>, position: impl Into<Option<BlockPos>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryLiquid action to the server.
Sourcepub async fn world_query_default_game_mode(
&self,
world: impl Into<Option<WorldRef>>,
) -> Result<(), SendError<PluginToHost>>
pub async fn world_query_default_game_mode( &self, world: impl Into<Option<WorldRef>>, ) -> Result<(), SendError<PluginToHost>>
Sends a WorldQueryDefaultGameMode action to the server.
Source§impl Server
impl Server
Sourcepub async fn send_action(
&self,
kind: Kind,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_action( &self, kind: Kind, ) -> Result<(), SendError<PluginToHost>>
Helper to build and send a single action.
Sourcepub async fn send_actions(
&self,
actions: Vec<Action>,
) -> Result<(), SendError<PluginToHost>>
pub async fn send_actions( &self, actions: Vec<Action>, ) -> Result<(), SendError<PluginToHost>>
Helper to send a batch of actions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request