mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fixed a crash
This commit is contained in:
parent
c138cb2797
commit
c45cd5e12a
@ -63,7 +63,7 @@ class PlayerAPI{
|
||||
break;
|
||||
case "player.death":
|
||||
if(is_numeric($data["cause"])){
|
||||
$e = $this->api->entity->get($data["cause"]);
|
||||
$e = $this->server->api->entity->get($data["cause"]);
|
||||
if($e instanceof Entity){
|
||||
switch($e->class){
|
||||
case ENTITY_PLAYER:
|
||||
@ -100,9 +100,6 @@ class PlayerAPI{
|
||||
case "fall":
|
||||
$message = " hit the ground too hard";
|
||||
break;
|
||||
case "flying":
|
||||
$message = " tried to fly up to the sky";
|
||||
break;
|
||||
default:
|
||||
$message = " died";
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user