Trait veloren_server::events::ServerEvent
source · pub trait ServerEvent: Send + Sync + 'static {
type SystemData<'a>: SystemData<'a>;
const NAME: &'static str = _;
// Required method
fn handle(
events: impl ExactSizeIterator<Item = Self>,
data: Self::SystemData<'_>,
);
}
Required Associated Types§
type SystemData<'a>: SystemData<'a>
Provided Associated Constants§
Required Methods§
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl ServerEvent for AuraEvent
impl ServerEvent for AuraEvent
type SystemData<'a> = (Storage<'a, Auras, FetchMut<'a, MaskedStorage<Auras>>>, Storage<'a, EnteredAuras, FetchMut<'a, MaskedStorage<EnteredAuras>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (auras, entered_auras): Self::SystemData<'_>, )
source§impl ServerEvent for BonkEvent
impl ServerEvent for BonkEvent
type SystemData<'a> = (Write<'a, BlockChange>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, ProgramTime, PanicHandler>, Read<'a, EventBus<CreateObjectEvent>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, terrain, program_time, create_object_events): Self::SystemData<'_>, )
source§impl ServerEvent for BuffEvent
impl ServerEvent for BuffEvent
type SystemData<'a> = (Read<'a, Time>, Storage<'a, Buffs, FetchMut<'a, MaskedStorage<Buffs>>>, Storage<'a, Body, Fetch<'a, MaskedStorage<Body>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (time, buffs, bodies, healths, stats, masses): Self::SystemData<'_>, )
source§impl ServerEvent for ChangeAbilityEvent
impl ServerEvent for ChangeAbilityEvent
type SystemData<'a> = (Storage<'a, ActiveAbilities, FetchMut<'a, MaskedStorage<ActiveAbilities>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>, Storage<'a, SkillSet, Fetch<'a, MaskedStorage<SkillSet>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (active_abilities, inventories, skill_sets): Self::SystemData<'_>, )
source§impl ServerEvent for ChangeBodyEvent
impl ServerEvent for ChangeBodyEvent
type SystemData<'a> = Storage<'a, Body, FetchMut<'a, MaskedStorage<Body>>>
fn handle( events: impl ExactSizeIterator<Item = Self>, bodies: Self::SystemData<'_>, )
source§impl ServerEvent for ChangeStanceEvent
impl ServerEvent for ChangeStanceEvent
type SystemData<'a> = Storage<'a, Stance, FetchMut<'a, MaskedStorage<Stance>>>
fn handle( events: impl ExactSizeIterator<Item = Self>, stances: Self::SystemData<'_>, )
source§impl ServerEvent for ComboChangeEvent
impl ServerEvent for ComboChangeEvent
type SystemData<'a> = (Read<'a, Time>, Read<'a, EventBus<Outcome>>, Storage<'a, Combo, FetchMut<'a, MaskedStorage<Combo>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (time, outcomes, combos, uids): Self::SystemData<'_>, )
source§impl ServerEvent for CreateSpriteEvent
impl ServerEvent for CreateSpriteEvent
type SystemData<'a> = (Write<'a, BlockChange, PanicHandler>, Write<'a, ScheduledBlockChange, PanicHandler>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, Time, PanicHandler>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, scheduled_block_change, terrain, time): Self::SystemData<'_>, )
source§impl ServerEvent for DestroyEvent
impl ServerEvent for DestroyEvent
Handle an entity dying. If it is a player, it will send a message to all other players. If the entity that killed it had stats, then give it exp for the kill. Experience given is equal to the level of the entity that was killed times 10.
type SystemData<'a> = DestroyEventData<'a>
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
source§impl ServerEvent for EnergyChangeEvent
impl ServerEvent for EnergyChangeEvent
type SystemData<'a> = Storage<'a, Energy, FetchMut<'a, MaskedStorage<Energy>>>
fn handle( events: impl ExactSizeIterator<Item = Self>, energies: Self::SystemData<'_>, )
source§impl ServerEvent for EntityAttackedHookEvent
impl ServerEvent for EntityAttackedHookEvent
source§fn handle(
events: impl ExactSizeIterator<Item = Self>,
data: Self::SystemData<'_>,
)
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
Intended to handle things that should happen for any successful attack, regardless of the damages and effects specific to that attack
type SystemData<'a> = EntityAttackedHookData<'a>
source§impl ServerEvent for ExplosionEvent
impl ServerEvent for ExplosionEvent
type SystemData<'a> = ExplosionData<'a>
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
source§impl ServerEvent for GroupManipEvent
impl ServerEvent for GroupManipEvent
type SystemData<'a> = (Read<'a, EntitiesRes>, Write<'a, GroupManager>, Read<'a, IdMaps>, Storage<'a, Group, FetchMut<'a, MaskedStorage<Group>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>, Storage<'a, MapMarker, Fetch<'a, MaskedStorage<MapMarker>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, group_manager, id_maps, groups, clients, uids, alignments, map_markers): Self::SystemData<'_>, )
source§impl ServerEvent for HealthChangeEvent
impl ServerEvent for HealthChangeEvent
type SystemData<'a> = HealthChangeEventData<'a>
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
source§impl ServerEvent for InitiateInviteEvent
impl ServerEvent for InitiateInviteEvent
type SystemData<'a> = (Write<'a, Trades>, Read<'a, Settings>, Read<'a, IdMaps>, Read<'a, GroupManager>, Storage<'a, PendingInvites, FetchMut<'a, MaskedStorage<PendingInvites>>>, Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, Invite, FetchMut<'a, MaskedStorage<Invite>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Group, Fetch<'a, MaskedStorage<Group>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (trades, settings, id_maps, group_manager, pending_invites, agents, invites, uids, clients, positions, groups, healths): Self::SystemData<'_>, )
source§impl ServerEvent for InventoryManipEvent
impl ServerEvent for InventoryManipEvent
type SystemData<'a> = InventoryManipData<'a>
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
source§impl ServerEvent for InviteResponseEvent
impl ServerEvent for InviteResponseEvent
type SystemData<'a> = InviteResponseData<'a>
fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )
source§impl ServerEvent for KnockbackEvent
impl ServerEvent for KnockbackEvent
type SystemData<'a> = (Read<'a, EntitiesRes>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, PhysicsState, Fetch<'a, MaskedStorage<PhysicsState>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Vel, FetchMut<'a, MaskedStorage<Vel>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, clients, physic_states, mass, velocities): Self::SystemData<'_>, )
source§impl ServerEvent for LandOnGroundEvent
impl ServerEvent for LandOnGroundEvent
type SystemData<'a> = (Read<'a, Time>, Read<'a, MaterialStatManifest, PanicHandler>, Read<'a, EventBus<HealthChangeEvent>>, Read<'a, EventBus<PoiseChangeEvent>>, Storage<'a, PhysicsState, Fetch<'a, MaskedStorage<PhysicsState>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (time, msm, health_change_events, poise_change_events, physic_states, character_states, masses, inventories, stats): Self::SystemData<'_>, )
source§impl ServerEvent for MakeAdminEvent
impl ServerEvent for MakeAdminEvent
type SystemData<'a> = (Storage<'a, Admin, FetchMut<'a, MaskedStorage<Admin>>>, Storage<'a, Player, Fetch<'a, MaskedStorage<Player>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (admins, players): Self::SystemData<'_>, )
source§impl ServerEvent for MineBlockEvent
impl ServerEvent for MineBlockEvent
type SystemData<'a> = (Write<'a, BlockChange, PanicHandler>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, MaterialStatManifest, PanicHandler>, Read<'a, AbilityMap, PanicHandler>, Read<'a, EventBus<CreateItemDropEvent>, PanicHandler>, Read<'a, EventBus<SoundEvent>, PanicHandler>, Read<'a, EventBus<Outcome>, PanicHandler>, Read<'a, ProgramTime, PanicHandler>, Read<'a, Time, PanicHandler>, Storage<'a, SkillSet, FetchMut<'a, MaskedStorage<SkillSet>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, terrain, msm, ability_map, create_item_drop_events, sound_events, outcomes, program_time, time, skill_sets, uids): Self::SystemData<'_>, )
source§impl ServerEvent for NpcInteractEvent
impl ServerEvent for NpcInteractEvent
type SystemData<'a> = (Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (agents, positions, uids): Self::SystemData<'_>, )
source§impl ServerEvent for ParryHookEvent
impl ServerEvent for ParryHookEvent
type SystemData<'a> = (Read<'a, Time>, Read<'a, EventBus<EnergyChangeEvent>>, Read<'a, EventBus<PoiseChangeEvent>>, Read<'a, EventBus<BuffEvent>>, Storage<'a, CharacterState, FetchMut<'a, MaskedStorage<CharacterState>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (time, energy_change_events, poise_change_events, buff_events, character_states, uids, stats, masses, inventories): Self::SystemData<'_>, )
source§impl ServerEvent for PoiseChangeEvent
impl ServerEvent for PoiseChangeEvent
type SystemData<'a> = (Read<'a, EntitiesRes>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>, Storage<'a, Poise, FetchMut<'a, MaskedStorage<Poise>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, character_states, poises): Self::SystemData<'_>, )
source§impl ServerEvent for RegrowHeadEvent
impl ServerEvent for RegrowHeadEvent
type SystemData<'a> = (Read<'a, EventBus<HealthChangeEvent>>, Read<'a, Time>, Storage<'a, Heads, FetchMut<'a, MaskedStorage<Heads>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>)
fn handle( events: impl ExactSizeIterator<Item = Self>, (health_change_events, time, heads, healths): Self::SystemData<'_>, )
source§impl ServerEvent for RemoveLightEmitterEvent
impl ServerEvent for RemoveLightEmitterEvent
type SystemData<'a> = Storage<'a, LightEmitter, FetchMut<'a, MaskedStorage<LightEmitter>>>
fn handle( events: impl ExactSizeIterator<Item = Self>, light_emitters: Self::SystemData<'_>, )
source§impl ServerEvent for RequestPluginsEvent
impl ServerEvent for RequestPluginsEvent
Send missing plugins to the client