Player: don't kick for attacking non-attackable entities

this is quite out-of-character for PM - it usually handles bad network requests by ignoring them, not by kicking the player off the server.
This commit is contained in:
Dylan K. Taylor 2021-01-08 20:58:15 +00:00
parent 3dd01781d5
commit 3ef2a19527
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -1626,8 +1626,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return false;
}
if($entity instanceof ItemEntity or $entity instanceof Arrow){
$this->kick("Attempting to attack an invalid entity");
$this->logger->warning($this->getServer()->getLanguage()->translateString("pocketmine.player.invalidEntity", [$this->getName()]));
$this->logger->debug("Attempted to attack non-attackable entity " . get_class($entity));
return false;
}