mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +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
|
$this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 2)); //Ouch! sound
|
||||||
}
|
}
|
||||||
if($this->player instanceof Player){
|
if($this->player instanceof Player){
|
||||||
$this->player->blocked = true;
|
|
||||||
$this->player->dataPacket(MC_SET_HEALTH, array(
|
$this->player->dataPacket(MC_SET_HEALTH, array(
|
||||||
"health" => $this->health,
|
"health" => $this->health,
|
||||||
));
|
));
|
||||||
@ -676,6 +675,7 @@ class Entity extends stdClass{
|
|||||||
$this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 3)); //Entity dead
|
$this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 3)); //Entity dead
|
||||||
}
|
}
|
||||||
if($this->player instanceof Player){
|
if($this->player instanceof Player){
|
||||||
|
$this->player->blocked = true;
|
||||||
$this->server->api->dhandle("player.death", array("name" => $this->name, "cause" => $cause));
|
$this->server->api->dhandle("player.death", array("name" => $this->name, "cause" => $cause));
|
||||||
}else{
|
}else{
|
||||||
$this->close();
|
$this->close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user