pocketmine\entity\Snake::kill PHP Method

kill() public method

public kill ( )
    public function kill()
    {
        if (!$this->isAlive()) {
            return;
        }
        parent::kill();
        foreach ($this->getDrops() as $item) {
            $this->getLevel()->dropItem($this, $item);
        }
        if (!$this->closed) {
            $this->close();
        }
    }