mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fixed players not being able to move after being damaged
This commit is contained in:
parent
b9498275a4
commit
3e4efbb26a
@ -647,7 +647,6 @@ class Entity extends stdClass{
|
||||
$this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 2)); //Ouch! sound
|
||||
}
|
||||
if($this->player instanceof Player){
|
||||
$this->player->blocked = true;
|
||||
$this->player->dataPacket(MC_SET_HEALTH, array(
|
||||
"health" => $this->health,
|
||||
));
|
||||
@ -676,6 +675,7 @@ class Entity extends stdClass{
|
||||
$this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 3)); //Entity dead
|
||||
}
|
||||
if($this->player instanceof Player){
|
||||
$this->player->blocked = true;
|
||||
$this->server->api->dhandle("player.death", array("name" => $this->name, "cause" => $cause));
|
||||
}else{
|
||||
$this->close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user