mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
entcnt command:
This commit is contained in:
parent
233fa5a85e
commit
c961de59ba
1 changed files with 3 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ class EntityAPI{
|
|||
$this->server->api->console->register("summon", "<mob>", [$this, "commandHandler"]);
|
||||
$this->server->api->console->register("spawnmob", "<mob>", [$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)){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue