Player: do not handle inbound ActorEvents that are not for self

This commit is contained in:
Dylan K. Taylor 2020-03-13 15:15:20 +00:00
parent 2020fcd18e
commit 330e93e5e3

View File

@ -2249,6 +2249,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}
public function handleEntityEvent(ActorEventPacket $packet) : bool{
if($packet->entityRuntimeId !== $this->id){
//TODO HACK: EATING_ITEM is sent back to the server when the server sends it for other players (1.14 bug, maybe earlier)
return $packet->event === ActorEventPacket::EATING_ITEM;
}
if(!$this->spawned or !$this->isAlive()){
return true;
}