PocketMine-MP 5.15.1 git-fb9a74e8799c71ed8292cfa53abe7a4c9204629d
pocketmine\network\mcpe\EntityEventBroadcaster Interface Reference
+ Inheritance diagram for pocketmine\network\mcpe\EntityEventBroadcaster:
+ Collaboration diagram for pocketmine\network\mcpe\EntityEventBroadcaster:

Public Member Functions

 onEmote (array $recipients, Human $from, string $emoteId)
 
 onEntityEffectAdded (array $recipients, Living $entity, EffectInstance $effect, bool $replacesOldEffect)
 
 onEntityEffectRemoved (array $recipients, Living $entity, EffectInstance $effect)
 
 onEntityRemoved (array $recipients, Entity $entity)
 
 onMobArmorChange (array $recipients, Living $mob)
 
 onMobMainHandItemChange (array $recipients, Human $mob)
 
 onMobOffHandItemChange (array $recipients, Human $mob)
 
 onPickUpItem (array $recipients, Entity $collector, Entity $pickedUp)
 
 syncActorData (array $recipients, Entity $entity, array $properties)
 
 syncAttributes (array $recipients, Living $entity, array $attributes)
 

Detailed Description

This class allows broadcasting entity events to many viewers on the server network.

Definition at line 36 of file EntityEventBroadcaster.php.

Member Function Documentation

◆ onEmote()

pocketmine\network\mcpe\EntityEventBroadcaster::onEmote ( array  $recipients,
Human  $from,
string  $emoteId 
)

◆ onEntityEffectAdded()

pocketmine\network\mcpe\EntityEventBroadcaster::onEntityEffectAdded ( array  $recipients,
Living  $entity,
EffectInstance  $effect,
bool  $replacesOldEffect 
)

◆ onEntityEffectRemoved()

pocketmine\network\mcpe\EntityEventBroadcaster::onEntityEffectRemoved ( array  $recipients,
Living  $entity,
EffectInstance  $effect 
)

◆ onEntityRemoved()

pocketmine\network\mcpe\EntityEventBroadcaster::onEntityRemoved ( array  $recipients,
Entity  $entity 
)

◆ onMobArmorChange()

pocketmine\network\mcpe\EntityEventBroadcaster::onMobArmorChange ( array  $recipients,
Living  $mob 
)

◆ onMobMainHandItemChange()

pocketmine\network\mcpe\EntityEventBroadcaster::onMobMainHandItemChange ( array  $recipients,
Human  $mob 
)

TODO: expand this to more than just humans

Parameters
NetworkSession[]$recipients

Implemented in pocketmine\network\mcpe\StandardEntityEventBroadcaster.

◆ onMobOffHandItemChange()

pocketmine\network\mcpe\EntityEventBroadcaster::onMobOffHandItemChange ( array  $recipients,
Human  $mob 
)

◆ onPickUpItem()

pocketmine\network\mcpe\EntityEventBroadcaster::onPickUpItem ( array  $recipients,
Entity  $collector,
Entity  $pickedUp 
)

◆ syncActorData()

pocketmine\network\mcpe\EntityEventBroadcaster::syncActorData ( array  $recipients,
Entity  $entity,
array  $properties 
)
Parameters
NetworkSession[]$recipients
MetadataProperty[]$properties

@phpstan-param array<int, MetadataProperty> $properties

Implemented in pocketmine\network\mcpe\StandardEntityEventBroadcaster.

◆ syncAttributes()

pocketmine\network\mcpe\EntityEventBroadcaster::syncAttributes ( array  $recipients,
Living  $entity,
array  $attributes 
)
Parameters
NetworkSession[]$recipients
Attribute[]$attributes

Implemented in pocketmine\network\mcpe\StandardEntityEventBroadcaster.


The documentation for this interface was generated from the following file: