mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
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:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user