mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +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:
parent
3dd01781d5
commit
3ef2a19527
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user