mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Fixed a crash
This commit is contained in:
parent
c138cb2797
commit
c45cd5e12a
1 changed files with 1 additions and 4 deletions
|
|
@ -63,7 +63,7 @@ class PlayerAPI{
|
||||||
break;
|
break;
|
||||||
case "player.death":
|
case "player.death":
|
||||||
if(is_numeric($data["cause"])){
|
if(is_numeric($data["cause"])){
|
||||||
$e = $this->api->entity->get($data["cause"]);
|
$e = $this->server->api->entity->get($data["cause"]);
|
||||||
if($e instanceof Entity){
|
if($e instanceof Entity){
|
||||||
switch($e->class){
|
switch($e->class){
|
||||||
case ENTITY_PLAYER:
|
case ENTITY_PLAYER:
|
||||||
|
|
@ -100,9 +100,6 @@ class PlayerAPI{
|
||||||
case "fall":
|
case "fall":
|
||||||
$message = " hit the ground too hard";
|
$message = " hit the ground too hard";
|
||||||
break;
|
break;
|
||||||
case "flying":
|
|
||||||
$message = " tried to fly up to the sky";
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$message = " died";
|
$message = " died";
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue