Update Player.php

trying to fix error in minigames
This commit is contained in:
ArkQuark 2023-01-28 21:50:27 +03:00 • committed by GitHub
parent c402e9623b
commit 7d3c95081b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1773,7 +1773,8 @@ 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;
$data["player"] = $this;
if($this->server->handle("player.interact", $data) !== false){
$target->interactWith($this->entity, $packet->action);
}