mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-16 04:43:51 +00:00
finish rewrite; port to cmake, loads of other changes
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
This commit is contained in:
parent
ecb3f00bd6
commit
f5f9aa1cf5
107 changed files with 14289 additions and 40 deletions
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
#include "..\..\ServerCliEngine.h"
|
||||
#include "..\..\ServerCliRegistry.h"
|
||||
#include "..\..\..\FourKitBridge.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace ServerRuntime
|
||||
{
|
||||
|
|
@ -40,6 +43,34 @@ namespace ServerRuntime
|
|||
row += commands[i]->Description();
|
||||
engine->LogInfo(row);
|
||||
}
|
||||
|
||||
char buf[4096];
|
||||
int len = 0;
|
||||
int count = FourKitBridge::GetPluginCommandHelp(buf, sizeof(buf), &len);
|
||||
if (count > 0 && len > 0)
|
||||
{
|
||||
engine->LogInfo("Plugin commands:");
|
||||
const char *ptr = buf;
|
||||
const char *end = buf + len;
|
||||
for (int i = 0; i < count && ptr < end; ++i)
|
||||
{
|
||||
std::string usage(ptr);
|
||||
ptr += usage.size() + 1;
|
||||
if (ptr >= end) break;
|
||||
std::string description(ptr);
|
||||
ptr += description.size() + 1;
|
||||
|
||||
std::string row = " ";
|
||||
row += usage;
|
||||
if (!description.empty())
|
||||
{
|
||||
row += " - ";
|
||||
row += description;
|
||||
}
|
||||
engine->LogInfo(row);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue