Feature/plugin api experimental (#12)

* added a null check to fix crash, expose internal latency value (its buggy)

* fix latency calculations

* sending packets from c#

* world save event, move shutdown def, move called location of shutdown, expose FourKit.FireEvent

* add docs

---------

Co-authored-by: sylvessa <225480449+sylvessa@users.noreply.github.com>
This commit is contained in:
DrPerkyLegit 2026-04-05 22:21:22 -04:00 committed by GitHub
parent 682989c8f1
commit 21b5accc69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1420 additions and 20 deletions

View file

@ -678,6 +678,7 @@ int main(int argc, char **argv)
{
LogWorldIO("requesting autosave");
app.SetXuiServerAction(kServerActionPad, eXuiServerAction_AutoSaveGame);
FourKitBridge::FireWorldSave();
autosaveRequested = true;
}
nextAutosaveTick = now + autosaveIntervalMs;
@ -688,6 +689,8 @@ int main(int argc, char **argv)
serverCli.Stop();
app.m_bShutdown = true;
FourKitBridge::Shutdown(); //close out the translation layer early for plugin shutdown
LogInfof("shutdown", "Dedicated server stopped");
MinecraftServer *server = MinecraftServer::getInstance();
if (server != NULL)
@ -721,7 +724,6 @@ int main(int argc, char **argv)
}
LogInfof("shutdown", "Cleaning up and exiting.");
FourKitBridge::Shutdown();
WinsockNetLayer::Shutdown();
LogDebugf("shutdown", "Network layer shutdown complete.");
g_NetworkManager.Terminate();