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:
sylvessa 2026-03-21 13:52:26 -05:00
parent ecb3f00bd6
commit f5f9aa1cf5
107 changed files with 14289 additions and 40 deletions

View file

@ -26,6 +26,7 @@
#include "..\Common\StringUtils.h"
#include "..\ServerShutdown.h"
#include "..\ServerLogger.h"
#include "..\FourKitBridge.h"
#include "..\..\Minecraft.Client\MinecraftServer.h"
#include "..\..\Minecraft.Client\PlayerList.h"
#include "..\..\Minecraft.Client\ServerPlayer.h"
@ -161,6 +162,10 @@ namespace ServerRuntime
IServerCliCommand *command = m_registry->FindMutable(parsed.tokens[0]);
if (command == NULL)
{
if (FourKitBridge::HandleConsoleCommand(normalizedLine))
{
return true;
}
LogWarn("Unknown command: " + parsed.tokens[0]);
return false;
}
@ -207,6 +212,38 @@ namespace ServerRuntime
}
m_registry->SuggestCommandNames(prefix, linePrefix, out);
char buf[4096];
int len = 0;
int count = FourKitBridge::GetPluginCommandHelp(buf, sizeof(buf), &len);
if (count > 0 && len > 0)
{
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 name = usage;
if (!name.empty() && name[0] == '/')
{
name = name.substr(1);
}
if (name.size() >= prefix.size() &&
name.compare(0, prefix.size(), prefix) == 0)
{
out->push_back(linePrefix + name);
}
}
}
}
else
{