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

View File

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