mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Living: remove sendPotionEffects() network crap
This commit is contained in:
parent
9fe073fa73
commit
61d443bf4e
@ -346,17 +346,6 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the mob's potion effects to the specified player.
|
|
||||||
*
|
|
||||||
* @param Player $player
|
|
||||||
*/
|
|
||||||
public function sendPotionEffects(Player $player) : void{
|
|
||||||
foreach($this->effects as $effect){
|
|
||||||
$player->getNetworkSession()->onEntityEffectAdded($this, $effect, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function onEffectAdded(EffectInstance $effect, bool $replacesOldEffect) : void{
|
protected function onEffectAdded(EffectInstance $effect, bool $replacesOldEffect) : void{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,9 @@ class PreSpawnPacketHandler extends PacketHandler{
|
|||||||
$this->session->syncAttributes($this->player, true);
|
$this->session->syncAttributes($this->player, true);
|
||||||
$this->session->syncAvailableCommands();
|
$this->session->syncAvailableCommands();
|
||||||
$this->session->syncAdventureSettings($this->player);
|
$this->session->syncAdventureSettings($this->player);
|
||||||
$this->player->sendPotionEffects($this->player);
|
foreach($this->player->getEffects() as $effect){
|
||||||
|
$this->session->onEntityEffectAdded($this->player, $effect, false);
|
||||||
|
}
|
||||||
$this->player->sendData($this->player);
|
$this->player->sendData($this->player);
|
||||||
|
|
||||||
$this->session->getInvManager()->syncAll();
|
$this->session->getInvManager()->syncAll();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user