fixed small bug in player.interact event

This commit is contained in:
GameHerobrine 2023-01-28 21:54:17 +03:00
parent 7d3c95081b
commit f469a186c2

View file

@ -1773,7 +1773,7 @@ class Player{
$target = $this->server->api->entity->get($packet->target);
if($target instanceof Entity and $this->entity instanceof Entity and $this->gamemode !== VIEW and $this->blocked === false and ($target instanceof Entity) and $this->entity->distance($target) <= 8){
$data["targetentity"] = $packet->target;
$data["entity"] = $this;
$data["entity"] = $this->entity;
$data["player"] = $this;
if($this->server->handle("player.interact", $data) !== false){
$target->interactWith($this->entity, $packet->action);