diff --git a/src/API/EntityAPI.php b/src/API/EntityAPI.php index cdcff6ff..474b073d 100644 --- a/src/API/EntityAPI.php +++ b/src/API/EntityAPI.php @@ -17,6 +17,7 @@ class EntityAPI{ $this->server->api->console->register("summon", "", [$this, "commandHandler"]); $this->server->api->console->register("spawnmob", "", [$this, "commandHandler"]); $this->server->api->console->register("despawn", "", [$this, "CommandHandler"]); + $this->server->api->console->register("entcnt", "", [$this, "CommandHandler"]); } @@ -35,6 +36,8 @@ class EntityAPI{ ]; $output = ""; switch($cmd){ + case "entcnt": + return "Total amount of entities: ". count($this->entities); case "summon": case "spawnmob": if(!($issuer instanceof Player)){